/**
  * Get Plugin Loader
  *
  * @param  string $type
  * @return Zend_Loader_PluginLoader_Interface
  */
 public function getPluginLoader($type)
 {
     $type = strtoupper($type);
     if ($type != self::TRANSFER_ADAPTER) {
         return parent::getPluginLoader($type);
     }
     if (!array_key_exists($type, $this->_loaders)) {
         require_once 'Zend/Loader/PluginLoader.php';
         $loader = new Zend_Loader_PluginLoader(array('Zend_File_Transfer_Adapter' => 'Zend/File/Transfer/Adapter/'));
         $this->setPluginLoader($loader, self::TRANSFER_ADAPTER);
     }
     return $this->_loaders[$type];
 }
예제 #2
0
 /**
  * Retrieve plugin loader for validator or filter chain
  *
  * Support for plugin loader for Captcha adapters
  *
  * @param  string $type
  * @return Zend_Loader_PluginLoader
  * @throws Zend_Loader_Exception on invalid type.
  */
 public function getPluginLoader($type)
 {
     $type = strtoupper($type);
     if ($type == self::CAPTCHA) {
         if (!isset($this->_loaders[$type])) {
             require_once 'Zend/Loader/PluginLoader.php';
             $this->_loaders[$type] = new Zend_Loader_PluginLoader(array('Zend_Captcha' => 'Zend/Captcha/'));
         }
         return $this->_loaders[$type];
     } else {
         return parent::getPluginLoader($type);
     }
 }
예제 #3
0
파일: Captcha.php 프로젝트: stunti/zf2
 /**
  * Retrieve plugin loader for validator or filter chain
  *
  * Support for plugin loader for Captcha adapters
  *
  * @param  string $type
  * @return Zend_Loader_PluginLoader
  * @throws Zend_Loader_Exception on invalid type.
  */
 public function getPluginLoader($type)
 {
     $type = strtoupper($type);
     if ($type == self::CAPTCHA) {
         if (!isset($this->_loaders[$type])) {
             $this->_loaders[$type] = new \Zend\Loader\PluginLoader\PluginLoader(array('Zend\\Captcha' => 'Zend/Captcha/'));
         }
         return $this->_loaders[$type];
     } else {
         return parent::getPluginLoader($type);
     }
 }