Lab "performance"

- move some heavy introspection into cached part of MetaModel aka iterate over get_declared_classes() in order to check is_subclass_of($sPHPClass, 'ModuleHandlerAPI')
 - make use of an interface in order to rely on existing code

SVN:trunk[5926]
This commit is contained in:
Bruno Da Silva
2018-06-29 13:00:18 +00:00
parent b2384855fd
commit 401a8cdd77
3 changed files with 25 additions and 25 deletions

View File

@@ -25,7 +25,7 @@
* @license http://opensource.org/licenses/AGPL-3.0
*/
abstract class ModuleHandlerAPI
abstract class ModuleHandlerAPI implements ModuleHandlerApiInterface
{
public static function OnMetaModelStarted()
{
@@ -34,5 +34,19 @@ abstract class ModuleHandlerAPI
public static function OnMenuCreation()
{
}
public function __construct()
{
}
}
?>
interface ModuleHandlerApiInterface
{
public static function OnMetaModelStarted();
public static function OnMenuCreation();
public function __construct(); //empty params is required in order to be instantiable by MetaModel::InitClasses()
}