Skip to content

Commit

Permalink
ZF-10650: ensure zf.php works with new autoloader system
Browse files Browse the repository at this point in the history
- s/Autoloader/StandardAutoloader/
- Also, use appropriately -- must call register(), not a singleton, etc.
  • Loading branch information
weierophinney committed Nov 8, 2010
1 parent d4ec1fd commit bf40461
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions bin/zf.php
Original file line number Diff line number Diff line change
Expand Up @@ -383,14 +383,14 @@ protected function _setupToolRuntime()
protected function _tryClientLoad()
{
$this->_clientLoaded = false;
$fh = @fopen('Zend/Loader/Autoloader.php', 'r', true);
$fh = @fopen('Zend/Loader/StandardAutoloader.php', 'r', true);
if (!$fh) {
return $this->_clientLoaded; // false
} else {
fclose($fh);
unset($fh);
include 'Zend/Loader/Autoloader.php';
$this->_clientLoaded = class_exists('Zend\Loader\Autoloader', false);
include 'Zend/Loader/StandardAutoloader.php';
$this->_clientLoaded = class_exists('Zend\Loader\StandardAutoloader', false);
}

return $this->_clientLoaded;
Expand Down Expand Up @@ -604,7 +604,8 @@ protected function _runTool()
// ensure that zf.php loads the Zend_Tool_Project features
$configOptions['classesToLoad'] = 'Zend\Tool\Project\Provider\Manifest';

Zend\Loader\Autoloader::getInstance();
$autoloader = new Zend\Loader\StandardAutoloader();
$autoloader->register();

$console = new Zend\Tool\Framework\Client\Console\Console($configOptions);
$console->dispatch();
Expand Down

0 comments on commit bf40461

Please sign in to comment.