Changeset 11257
- Timestamp:
- Apr 9, 2009, 5:40:46 PM (13 years ago)
- Location:
- OpenPNE3/trunk/lib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
OpenPNE3/trunk/lib/migration/opMigration.class.php
r10856 r11257 106 106 { 107 107 $this->targetName = $name; 108 $this->pluginInstance = opPlugin::getInstance($this->targetName );108 $this->pluginInstance = opPlugin::getInstance($this->targetName, $this->dispatcher); 109 109 } 110 110 else -
OpenPNE3/trunk/lib/plugin/opPlugin.class.php
r10755 r11257 26 26 $summary; 27 27 28 private function __construct($pluginName )28 private function __construct($pluginName, sfEventDispatcher $dispatcher) 29 29 { 30 30 $this->name = $pluginName; … … 44 44 else 45 45 { 46 $manager = new opPluginManager( sfContext::getInstance()->getEventDispatcher());46 $manager = new opPluginManager($dispatcher); 47 47 $package = $manager->getEnvironment()->getRegistry()->getPackage($pluginName, opPluginManager::OPENPNE_PLUGIN_CHANNEL); 48 48 if ($package) … … 54 54 } 55 55 56 public static function getInstance($pluginName )56 public static function getInstance($pluginName, sfEventDispatcher $dispatcher = null) 57 57 { 58 if (is_null($dispatcher)) 59 { 60 $dispatcher = sfContext::getInstance()->getEventDispatcher(); 61 } 62 58 63 if (empty(self::$instances[$pluginName])) 59 64 { 60 self::$instances[$pluginName] = new opPlugin($pluginName );65 self::$instances[$pluginName] = new opPlugin($pluginName, $dispatcher); 61 66 } 62 67
Note: See TracChangeset
for help on using the changeset viewer.