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


PHP Zend_Loader_PluginLoader::addPrefixPath方法代码示例

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


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

示例1: getLoader

 public function getLoader()
 {
     if ($this->_loader == null) {
         $this->_loader = new Zend_Loader_PluginLoader();
         $this->_loader->addPrefixPath('Bc_Annotations', 'Bc/Annotations');
     }
     return $this->_loader;
 }
开发者ID:BGCX262,项目名称:zsoc-svn-to-git,代码行数:8,代码来源:Reader.php

示例2: getPluginLoader

 /**
  * Get plugin loader
  * 
  * @return Zend_Loader_PluginLoader
  */
 public function getPluginLoader()
 {
     if (null === $this->_loader) {
         $this->_loader = new Zend_Loader_PluginLoader();
         $this->_loader->addPrefixPath('Model_Table', dirname(__FILE__) . '/Table/');
     }
     return $this->_loader;
 }
开发者ID:jakemcgraw,项目名称:locamore,代码行数:13,代码来源:AModel.php

示例3: addPrefixToPaths

 public function addPrefixToPaths($prefix, $path = null)
 {
     if (is_array($prefix)) {
         $prefixToPaths = $prefix;
     } else {
         $prefixToPaths = array($prefix => $path);
     }
     foreach ($prefixToPaths as $prefix => $path) {
         $this->_pluginLoader->addPrefixPath($prefix, $path);
     }
     return $this;
 }
开发者ID:jorgenils,项目名称:zend-framework,代码行数:12,代码来源:PluginDirectory.php

示例4: _initPlugins

 protected function _initPlugins()
 {
     $this->bootstrap('frontController');
     $pluginsLoader = new Zend_Loader_PluginLoader();
     $pluginsLoader->addPrefixPath('Plugin', $this->getResourceLoader()->getBasePath() . '/plugins');
     $pluginsLoader->load("AclAdmin");
     //$pluginsLoader->load("SessionAdmin");
     //$pluginsLoader->load("Acl");
     $pluginsLoader->addPrefixPath('Plugin', APPLICATION_PATH . '/plugins');
     $pluginsLoader->load("LayoutLoader");
     if ($pluginsLoader->isLoaded('LayoutLoader')) {
         Zend_Controller_Front::getInstance()->registerPlugin(new Plugin_LayoutLoader());
     }
 }
开发者ID:Alpha-Hydro,项目名称:alpha-hydro-antares,代码行数:14,代码来源:Bootstrap.php

示例5: init

 public function init()
 {
     $registry = Zend_Registry::getInstance();
     $config = $registry->get("config");
     $sysCache = $registry->get("sysCache");
     $cacheFiles = new Ml_Cache_Files($sysCache);
     Zend_Controller_Action_HelperBroker::addPath(APPLICATION_PATH . '/controllers/helpers');
     $frontController = $this->getBootstrap()->getResource('FrontController');
     $dispatcher = $frontController->getDispatcher();
     $request = $frontController->getRequest();
     $router = $frontController->getRouter();
     $router->removeDefaultRoutes();
     //@todo remove this patched route module and use the original instead ASAP
     $compat = new Ml_Controller_Router_Route_Module(array(), $dispatcher, $request);
     $router->addRoute("default", $compat);
     $routerConfig = $cacheFiles->getConfigIni(APPLICATION_PATH . '/configs/' . HOST_MODULE . 'Routes.ini');
     $router->addConfig($routerConfig, "routes");
     $frontController->registerPlugin(new Ml_Plugins_ReservedUsernames());
     Zend_Controller_Action_HelperBroker::getStaticHelper("Redirector")->setPrependBase(false);
     $frontController->setBaseUrl($config['webroot']);
     $loader = new Zend_Loader_PluginLoader();
     $loader->addPrefixPath('Zend_View_Helper', EXTERNAL_LIBRARY_PATH . '/Zend/View/Helper/')->addPrefixPath('Ml_View_Helper', APPLICATION_PATH . '/views/helpers');
     $classFileIncCache = CACHE_PATH . '/PluginDefaultLoaderCache.php';
     if (file_exists($classFileIncCache)) {
         require $classFileIncCache;
     }
     Zend_Loader_PluginLoader::setIncludeFileCache($classFileIncCache);
     $viewRenderer = Zend_Controller_Action_HelperBroker::getStaticHelper('viewRenderer');
     $viewRenderer->initView();
 }
开发者ID:henvic,项目名称:MediaLab,代码行数:30,代码来源:Default.php

示例6: loadForm

 /**
  * Load a form with the provided options.
  *
  * @param string            $name    The name of the form to be loaded
  * @param array|Zend_Config $options Options to be passed to the form
  *                                   constructor.
  *
  * @return Zend_Form
  */
 public function loadForm($name, $options = null)
 {
     $module = $this->getRequest()->getModuleName();
     $front = $this->getFrontController();
     $default = $front->getDispatcher()->getDefaultModule();
     if (empty($module)) {
         $module = $default;
     }
     $moduleDirectory = $front->getControllerDirectory($module);
     $formsDirectory = dirname($moduleDirectory) . '/forms';
     $prefix = ('default' == $module ? '' : ucfirst($module) . '_') . 'Form_';
     $this->pluginLoader->addPrefixPath($prefix, $formsDirectory);
     $name = ucfirst((string) $name);
     $formClass = $this->pluginLoader->load($name);
     return new $formClass($options);
 }
开发者ID:louiesabado,项目名称:simple-php-contact-form,代码行数:25,代码来源:FormLoader.php

示例7: setOptions

 /**
  * Options setter.
  * @param array|Zend_Config $options
  */
 public function setOptions($options)
 {
     if ($options instanceof Zend_Config) {
         $options = $options->toArray();
     }
     if (is_array($options)) {
         if (isset($options['restApi']) && !$options['restApi'] instanceof Zend_Config) {
             $options['restApi'] = new Zend_Config($options['restApi']);
         }
         if (isset($options['pluginPath']) && is_array($options['pluginPath'])) {
             foreach ($options['pluginPath'] as $key => $pluginPathData) {
                 if (is_array($pluginPathData) && isset($pluginPathData['path']) && isset($pluginPathData['prefix'])) {
                     $this->_pluginLoader->addPrefixPath($pluginPathData['prefix'], $pluginPathData['path']);
                 }
             }
             unset($options['pluginPath']);
         }
         foreach ($options as $key => $value) {
             $method = 'set' . ucfirst($key);
             if (method_exists($this, $method)) {
                 $this->{$method}($value);
             } else {
                 $this->log(sprintf("No set method for option %s.", $key), Zend_Log::WARN);
             }
         }
     }
     return $this;
 }
开发者ID:SandeepUmredkar,项目名称:PortalSMIP,代码行数:32,代码来源:Service.php

示例8: getTableLoader

 /**
  * Returns the table loader for this instance.
  * @return Zend_Loader_PluginLoader
  */
 protected function getTableLoader()
 {
     if (!isset($this->_tableLoader)) {
         $this->_tableLoader = new Zend_Loader_PluginLoader();
         $this->_tableLoader->addPrefixPath('Hmd_Db_Model_Table', 'Hmd/Db/Model/Table');
     }
     return $this->_tableLoader;
 }
开发者ID:nextdude,项目名称:howmanydead.org,代码行数:12,代码来源:Model.php

示例9: _initPlugins

 /**
  * Load system module plugins
  */
 public function _initPlugins()
 {
     $loader = new Zend_Loader_PluginLoader();
     $loader->addPrefixPath('System_Plugin', 'application/modules/system/plugins/');
     $this->bootstrap('frontController');
     $front = $this->getResource('frontController');
     $front->registerPlugin(new System_Plugin_Router());
 }
开发者ID:rogercastaneda,项目名称:owlsys,代码行数:11,代码来源:Bootstrap.php

示例10: getPluginLoader

 /**
  * Get plugin loader
  *
  * @return Zend_Loader_PluginLoader_Interface
  */
 public static function getPluginLoader()
 {
     if (self::$pluginLoader == null) {
         $pluginLoader = new Zend_Loader_PluginLoader();
         $pluginLoader->addPrefixPath(__CLASS__, 'System/Serializer/Dom');
         self::$pluginLoader = $pluginLoader;
     }
     return self::$pluginLoader;
 }
开发者ID:kandy,项目名称:system,代码行数:14,代码来源:Dom.php

示例11: getPluginLoader

 /**
  * Get plugin loader
  *
  * @return Zend_Loader_PluginLoader_Interface
  */
 public static function getPluginLoader()
 {
     if (self::$pluginLoader == null) {
         $pluginLoader = new Zend_Loader_PluginLoader();
         $pluginLoader->addPrefixPath(str_replace('Abstract', '', __CLASS__), dirname(__FILE__));
         self::$pluginLoader = $pluginLoader;
     }
     return self::$pluginLoader;
 }
开发者ID:kandy,项目名称:system,代码行数:14,代码来源:Abstract.php

示例12: getPluginLoader

 /**
  * Get plugin loader
  *
  * @return Zend_Loader_PluginLoader_Interface
  */
 public static function getPluginLoader()
 {
     if (self::$pluginLoader == null) {
         $pluginLoader = new Zend_Loader_PluginLoader();
         $pluginLoader->addPrefixPath('System_Acl_Loader', 'System/Acl/Loader');
         self::$pluginLoader = $pluginLoader;
     }
     return self::$pluginLoader;
 }
开发者ID:kandy,项目名称:system,代码行数:14,代码来源:Loader.php

示例13: _initPlugins

 protected function _initPlugins()
 {
     $this->bootstrap('frontController');
     $pluginsLoader = new Zend_Loader_PluginLoader();
     $pluginsLoader->addPrefixPath("Plugin", APPLICATION_PATH . '/plugins');
     $front = Zend_Controller_Front::getInstance();
     $pluginsLoader->load("Redirect");
     if ($pluginsLoader->isLoaded("Redirect")) {
         $front->registerPlugin(new Plugin_Redirect());
     }
 }
开发者ID:Alpha-Hydro,项目名称:alpha-hydro-antares,代码行数:11,代码来源:Bootstrap.php

示例14: getManipulatorInstance

 /**
  * Returns an manipulator instance based on its name.
  *
  * @param string $manipulator
  * @return Gem_Manipulator_Adapter_Interface
  */
 public static function getManipulatorInstance($manipulator)
 {
     $args = array();
     if (is_array($manipulator)) {
         $args = $manipulator;
         $manipulator = array_shift($args);
     }
     // TODO: Move to allow other plugins...
     $loader = new Zend_Loader_PluginLoader();
     $loader->addPrefixPath('Yag_Manipulator_Adapter', 'Yag/Manipulator/Adapter/');
     $className = $loader->load($manipulator);
     $class = new ReflectionClass($className);
     if (!$class->implementsInterface('Yag_Manipulator_Adapter_Interface')) {
         require_once 'Yag/Manipulator/Exception.php';
         throw new Gem_Manipulator_Exception('Manipulator must implement interface "Yag_Manipulator_Adapter_Interface".');
     }
     if ($class->hasMethod('__construct')) {
         $object = $class->newInstanceArgs($args);
     } else {
         $object = $class->newInstance();
     }
     return $object;
 }
开发者ID:johannilsson,项目名称:yag,代码行数:29,代码来源:Manipulator.php

示例15: _getDefaultAdapterLoader

 /**
  * Returns a default adapter plugin loader
  *
  * @return Zend_Loader_PluginLoader
  */
 protected static function _getDefaultAdapterLoader()
 {
     $loader = new Zend_Loader_PluginLoader();
     $loader->addPrefixPath('Zend_Serializer_Adapter', dirname(__FILE__) . '/Serializer/Adapter');
     return $loader;
 }
开发者ID:trigoesrodrigo,项目名称:icingaweb2,代码行数:11,代码来源:Serializer.php


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