当前位置: 首页>>代码示例>>PHP>>正文


PHP E::GetClassInfo方法代码示例

本文整理汇总了PHP中E::GetClassInfo方法的典型用法代码示例。如果您正苦于以下问题:PHP E::GetClassInfo方法的具体用法?PHP E::GetClassInfo怎么用?PHP E::GetClassInfo使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在E的用法示例。


在下文中一共展示了E::GetClassInfo方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: Create

 /**
  * Creates decorator
  *
  * @param object $oComponent
  * @param bool   $bHookEnable
  *
  * @return Decorator
  */
 static function Create($oComponent, $bHookEnable = true)
 {
     $sClassName = get_class($oComponent);
     if (!$bHookEnable || $sClassName == 'ModulePlugin' || $sClassName == 'ModuleHook') {
         return $oComponent;
     }
     if (DEBUG) {
         $sDecoratorClassName = 'Decorator' . $sClassName;
         $sDecoratorClassCode = 'class ' . $sDecoratorClassName . ' extends Decorator { }';
         eval($sDecoratorClassCode);
         $oComponentDecorator = new $sDecoratorClassName($oComponent);
     } else {
         $oComponentDecorator = new static($oComponent);
     }
     $aClassInfo = E::GetClassInfo($oComponent, Engine::CI_ACTION | Engine::CI_MODULE);
     if ($aClassInfo[Engine::CI_ACTION]) {
         $oComponentDecorator->setType('action');
         $oComponentDecorator->setName($aClassInfo[Engine::CI_ACTION]);
         $oComponentDecorator->setHookEnable(true);
     } elseif ($aClassInfo[Engine::CI_MODULE]) {
         $oComponentDecorator->setType('module');
         $oComponentDecorator->setName($aClassInfo[Engine::CI_MODULE]);
         $oComponentDecorator->setHookEnable(true);
     }
     return $oComponentDecorator;
 }
开发者ID:AntiqS,项目名称:altocms,代码行数:34,代码来源:Decorator.class.php

示例2: Create

 /**
  * Creates decorator
  *
  * @param object $oComponent
  * @param bool   $bHookEnable
  *
  * @return object
  */
 static function Create($oComponent, $bHookEnable = true)
 {
     $sClassName = get_class($oComponent);
     if (!$bHookEnable || $sClassName == 'ModulePlugin' || $sClassName == 'ModuleHook') {
         return $oComponent;
     }
     $oComponentDecorator = new static($oComponent);
     $aClassInfo = E::GetClassInfo($oComponent, Engine::CI_ACTION | Engine::CI_MODULE);
     if ($aClassInfo[Engine::CI_ACTION]) {
         $oComponentDecorator->setType('action');
         $oComponentDecorator->setName($aClassInfo[Engine::CI_ACTION]);
         $oComponentDecorator->setHookEnable(true);
     } elseif ($aClassInfo[Engine::CI_MODULE]) {
         $oComponentDecorator->setType('module');
         $oComponentDecorator->setName($aClassInfo[Engine::CI_MODULE]);
         $oComponentDecorator->setHookEnable(true);
     }
     return $oComponentDecorator;
 }
开发者ID:ZeoNish,项目名称:altocms,代码行数:27,代码来源:Decorator.class.php

示例3: Autoload

 /**
  * Автозагрузка классов
  *
  * @param string $sClassName    Название класса
  *
  * @return bool
  */
 public static function Autoload($sClassName)
 {
     if ($sParentClass = Config::Get('classes.alias.' . $sClassName)) {
         return self::_classAlias($sParentClass, $sClassName);
     }
     if (self::_autoloadDefinedClass($sClassName)) {
         return true;
     }
     if (class_exists('Engine', false) && E::GetStage() >= E::STAGE_INIT) {
         $aInfo = E::GetClassInfo($sClassName, E::CI_CLASSPATH | E::CI_INHERIT);
         if ($aInfo[E::CI_INHERIT]) {
             $sInheritClass = $aInfo[E::CI_INHERIT];
             $sParentClass = E::ModulePlugin()->GetParentInherit($sInheritClass);
             return self::_classAlias($sParentClass, $sClassName);
         } elseif ($aInfo[E::CI_CLASSPATH]) {
             return self::_includeFile($aInfo[E::CI_CLASSPATH], $sClassName);
         }
     }
     if (self::_autoloadPSR($sClassName)) {
         return true;
     }
     return false;
 }
开发者ID:Azany,项目名称:altocms,代码行数:30,代码来源:Loader.class.php

示例4: _Method

 /**
  * Проксирует вызов методов в модуль сущности
  *
  * @param string $sName    Название метода
  *
  * @return mixed
  */
 protected function _Method($sName)
 {
     $sModuleName = E::GetModuleName($this);
     $sEntityName = E::GetEntityName($this);
     $sPluginPrefix = E::GetPluginPrefix($this);
     /**
      * If Module not exists, try to find its root Delegater
      */
     $aClassInfo = E::GetClassInfo($sPluginPrefix . 'Module_' . $sModuleName, Engine::CI_MODULE);
     if (empty($aClassInfo[E::CI_MODULE]) && ($sRootDelegater = E::ModulePlugin()->GetRootDelegater('entity', get_class($this)))) {
         $sModuleName = E::GetModuleName($sRootDelegater);
         $sPluginPrefix = E::GetPluginPrefix($sRootDelegater);
     }
     $aCallArgs = array($this);
     return E::GetInstance()->_CallModule("{$sPluginPrefix}{$sModuleName}_{$sName}{$sEntityName}", $aCallArgs);
 }
开发者ID:AntiqS,项目名称:altocms,代码行数:23,代码来源:EntityORM.class.php


注:本文中的E::GetClassInfo方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。