Replaced $initalize Plugin class member by static one

This commit is contained in:
Dmitriy Simushev 2012-07-24 16:14:04 +00:00
parent 36547eeeca
commit 17369b2f14
3 changed files with 3 additions and 3 deletions

View File

@ -33,7 +33,7 @@ Class Phpunit_autotest_plugin_managerPlugin extends Plugin{
} }
public function __construct(){ public function __construct(){
$this->initialized = true; self::$initialized = true;
} }
} }

View File

@ -25,7 +25,7 @@ abstract Class Plugin {
* failures * failures
* @var boolean * @var boolean
*/ */
public $initialized = false; public static $initialized = false;
/** /**
* An array of plugin configuration * An array of plugin configuration

View File

@ -78,7 +78,7 @@ Class PluginManager {
} }
// Add plugin to loading queue // Add plugin to loading queue
$plugin_instance = new $plugin_classname($plugin_config); $plugin_instance = new $plugin_classname($plugin_config);
if ($plugin_instance->initialized) { if ($plugin_classname::$initialized) {
$loading_queue[$plugin_instance->getWeight() . "_" . $offset] = $plugin_instance; $loading_queue[$plugin_instance->getWeight() . "_" . $offset] = $plugin_instance;
$offset++; $offset++;
} else { } else {