示例#1
0
文件: Captcha.php 项目: rexmac/zf2
 /**
  * Retrieve plugin loader for validator or filter chain
  *
  * Support for plugin loader for Captcha adapters
  *
  * @param  string $type
  * @return \Zend\Loader\PrefixPathMapper
  * @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 PluginLoader(array('Zend\\Captcha' => 'Zend/Captcha/'));
         }
         return $this->_loaders[$type];
     } else {
         return parent::getPluginLoader($type);
     }
 }
示例#2
0
 /**
  * Get Plugin Loader
  *
  * @param  string $type
  * @return \Zend\Loader\PrefixPathMapper
  */
 public function getPluginLoader($type)
 {
     $type = strtoupper($type);
     if ($type != self::TRANSFER_ADAPTER) {
         return parent::getPluginLoader($type);
     }
     if (!array_key_exists($type, $this->_loaders)) {
         $loader = new PrefixPathLoader(array('Zend\\File\\Transfer\\Adapter' => 'Zend/File/Transfer/Adapter/'));
         $this->setPluginLoader($loader, self::TRANSFER_ADAPTER);
     }
     return $this->_loaders[$type];
 }