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


PHP Engine::GetClassInfo方法代码示例

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


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

示例1: autoload

 public static function autoload($sClassName)
 {
     if (!class_exists('Engine')) {
         return;
     }
     $aInfo = Engine::GetClassInfo($sClassName, Engine::CI_CLASSPATH | Engine::CI_INHERIT);
     if ($aInfo[Engine::CI_INHERIT]) {
         $sInheritClass = $aInfo[Engine::CI_INHERIT];
         $sParentClass = self::GetParentInherit($sInheritClass);
         if (class_alias($sParentClass, $sClassName)) {
             return true;
         }
     }
 }
开发者ID:bhoidhos,项目名称:aceAdminPanel,代码行数:14,代码来源:ACE.php

示例2: autoload

 /**
  * Автозагрузка классов
  *
  * @param string $sClassName Название класса
  * @return bool
  */
 public static function autoload($sClassName)
 {
     $aInfo = Engine::GetClassInfo($sClassName, Engine::CI_CLASSPATH | Engine::CI_INHERIT);
     if ($aInfo[Engine::CI_INHERIT]) {
         $sInheritClass = $aInfo[Engine::CI_INHERIT];
         $sParentClass = Engine::getInstance()->Plugin_GetParentInherit($sInheritClass);
         if (!class_alias($sParentClass, $sClassName)) {
             dump("(autoload {$sParentClass}) Can not load CLASS-file");
         } else {
             return true;
         }
     } elseif ($aInfo[Engine::CI_CLASSPATH]) {
         require_once $aInfo[Engine::CI_CLASSPATH];
         return true;
     } elseif (!class_exists($sClassName)) {
         dump("(autoload {$sClassName}) Can not load CLASS-file");
         dump($aInfo);
         //throw new Exception("(autoload '$sClassName') Can not load CLASS-file");
     }
     return false;
 }
开发者ID:cbrspc,项目名称:LIVESTREET-1-DISTRIB,代码行数:27,代码来源:Engine.class.php

示例3: _Method

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

示例4: autoload

 /**
  * Автозагрузка классов
  *
  * @param string $sClassName	Название класса
  * @return bool
  */
 public static function autoload($sClassName)
 {
     $aInfo = Engine::GetClassInfo($sClassName, Engine::CI_CLASSPATH | Engine::CI_INHERIT);
     if ($aInfo[Engine::CI_INHERIT]) {
         $sInheritClass = $aInfo[Engine::CI_INHERIT];
         $sParentClass = Engine::getInstance()->Plugin_GetParentInherit($sInheritClass);
         if (class_alias($sParentClass, $sClassName)) {
             return true;
         }
     } elseif ($aInfo[Engine::CI_CLASSPATH]) {
         require_once $aInfo[Engine::CI_CLASSPATH];
         return true;
     } elseif (!class_exists($sClassName)) {
         /**
          * Проверяем соответствие PSR-0
          */
         $sClassName = ltrim($sClassName, '\\');
         $sFileName = '';
         $sNameSpace = '';
         if ($iLastNsPos = strrpos($sClassName, '\\')) {
             $sNameSpace = substr($sClassName, 0, $iLastNsPos);
             $sClassName = substr($sClassName, $iLastNsPos + 1);
             $sFileName = str_replace('\\', DIRECTORY_SEPARATOR, $sNameSpace) . DIRECTORY_SEPARATOR;
         }
         $sFileName .= str_replace('_', DIRECTORY_SEPARATOR, $sClassName) . '.php';
         $sFileName = Config::Get('path.framework.libs_vendor.server') . DIRECTORY_SEPARATOR . $sFileName;
         if (file_exists($sFileName)) {
             require_once $sFileName;
             return true;
         }
         //throw new Exception("(autoload '$sClassName') Can not load CLASS-file");
     }
     return false;
 }
开发者ID:KaMaToZzz,项目名称:livestreet-framework,代码行数:40,代码来源:Engine.class.php


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