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


PHP Gdn::_PluginManager方法代码示例

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


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

示例1: factoryInstall

 /**
  * Install a class to the factory.
  *
  * @param string $Alias An alias for the class that will be used to retreive instances of it.
  * @param string $ClassName The actual name of the class.
  * @param string $Path The path to the class' file. You can prefix the path with ~ to start at the application root.
  * @param string $FactoryType The way objects will be instantiated for the class. One of (Gdn::FactoryInstance, Gdn::FactoryPrototype, Gdn::FactorySingleton).
  * @see Gdn_Factory::Install()
  */
 public static function factoryInstall($Alias, $ClassName, $Path = '', $FactoryType = self::FactorySingleton, $Data = null)
 {
     // Don't overwrite an existing definition.
     if (self::$_FactoryOverwrite === false && self::factoryExists($Alias)) {
         return;
     }
     self::factory()->install($Alias, $ClassName, $Path, $FactoryType, $Data);
     // Cache some of the more commonly used factory objects as properties.
     switch ($Alias) {
         case self::AliasConfig:
             self::$_Config = self::factory($Alias);
             break;
         case self::AliasLocale:
             self::$_Locale = self::factory($Alias);
             break;
         case self::AliasRequest:
             self::$_Request = self::factory($Alias);
             break;
         case self::AliasPluginManager:
             self::$_PluginManager = self::factory($Alias);
             break;
         case self::AliasSession:
             self::$_Session = null;
             break;
     }
 }
开发者ID:R-J,项目名称:vanilla,代码行数:35,代码来源:class.gdn.php

示例2: FactoryInstall

 /**
  * Install a class to the factory.
  * 
  * @param string $Alias An alias for the class that will be used to retreive instances of it.
  * @param string $ClassName The actual name of the class.
  * @param string $Path The path to the class' file. You can prefix the path with ~ to start at the application root.
  * @param string $FactoryType The way objects will be instantiated for the class. One of (Gdn::FactoryInstance, Gdn::FactoryPrototype, Gdn::FactorySingleton).
  * @see Gdn_Factory::Install()
  */
 public static function FactoryInstall($Alias, $ClassName, $Path, $FactoryType = self::FactoryInstance, $Data = NULL)
 {
     // Don't overwrite an existing definition.
     if (self::$_FactoryOverwrite === FALSE && self::FactoryExists($Alias)) {
         return;
     }
     self::$_Factory->Install($Alias, $ClassName, $Path, $FactoryType, $Data);
     // Cache some of the more commonly used factory objects as properties.
     switch ($Alias) {
         case self::AliasConfig:
             self::$_Config = self::Factory($Alias);
             break;
         case self::AliasRequest:
             self::$_Request = self::Factory($Alias);
             break;
         case self::AliasPluginManager:
             self::$_PluginManager = self::Factory($Alias);
             break;
         case self::AliasSession:
             self::$_Session = NULL;
             break;
     }
 }
开发者ID:nickhx,项目名称:Garden,代码行数:32,代码来源:class.gdn.php


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