public function Autoloader($sClassName) { if (HelperPluginLoader::getInstance()->AutoloadIgnoreClass($sClassName)) { return; } $this->DeclareClass($sClassName); }
/** * Инициализация плагина * * @return void */ public function Init() { if (version_compare(LS_VERSION, '0.5', '<')) { HelperPlugin::InitPlugin($this); } else { HelperPluginLoader::getInstance()->Init(); } $sDataFile = $this->PluginAceadminpanel_Admin_GetCustomConfigFile(); if (!file_exists($sDataFile)) { $aConfigSet = $this->PluginAceadminpanel_Admin_GetValueArrayByPrefix('config.all.'); @file_put_contents($sDataFile, serialize($aConfigSet)); } $this->LoadPluginsConfig(); }
protected function _EventPluginsExternalAdmin($nOffset) { $sActionClass = 'Plugin' . ucfirst($this->GetParam($nOffset)) . '_ActionAdminPlugin'; $sActionClass = $this->Plugin_GetDelegate('action', $sActionClass); if ($this->Plugin_GetDelegationChain('action', $sActionClass)) { $sActionClass = $this->Plugin_GetDelegate('action', $sActionClass); } $sFile = HelperPluginLoader::getInstance()->Class2Dir($sActionClass); if (ACE::FileExists($sFile)) { $this->sMenuSubItemSelect = 'plugins_admin_' . strtolower($this->GetParam($nOffset)); $this->oAdminAction = new $sActionClass($this->oEngine, 'admin'); if (method_exists($this->oAdminAction, 'Init')) { $this->oAdminAction->Init(); } if (method_exists($this->oAdminAction, 'Admin')) { $this->oAdminAction->Admin(); } elseif (method_exists($this->oAdminAction, 'EventIndex')) { $this->oAdminAction->EventIndex(); } if (method_exists($this->oAdminAction, 'EventShutdown')) { $this->oAdminAction->EventShutdown(); } if (method_exists($this->oAdminAction, 'Done')) { $this->oAdminAction->Done(); } } }
public static function getInstance() { if (self::$oInstance === null) { self::$oInstance = new self(); } return self::$oInstance; }