1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-05-10 04:48:19 +03:00

в плагины добавлен метод GetVersion()

This commit is contained in:
Mzhelskiy Maxim 2010-06-05 18:11:53 +00:00
parent 3a32e9d120
commit ce1cee6bce

View file

@ -222,6 +222,20 @@ abstract class Plugin extends Object {
return false;
}
/**
* Получает версию плагина
*
* @return unknown
*/
public function GetVersion() {
preg_match('/^Plugin([\w]+)$/i',get_class($this),$aMatches);
$sPluginXML = Config::Get('path.root.server').'/plugins/'.strtolower($aMatches[1]).'/'.ModulePlugin::PLUGIN_XML_FILE;
if($oXml = @simplexml_load_file($sPluginXML)) {
return (string)$oXml->version;
}
return null;
}
public function __call($sName,$aArgs) {
return Engine::getInstance()->_CallModule($sName,$aArgs);
}