當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。