mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-05-20 17:58:24 +03:00
в плагины добавлен метод GetVersion()
This commit is contained in:
parent
3a32e9d120
commit
ce1cee6bce
|
@ -222,6 +222,20 @@ abstract class Plugin extends Object {
|
||||||
return false;
|
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) {
|
public function __call($sName,$aArgs) {
|
||||||
return Engine::getInstance()->_CallModule($sName,$aArgs);
|
return Engine::getInstance()->_CallModule($sName,$aArgs);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue