Example #1
0
 /**
  * Retrieve plugin loader for validator or filter chain
  *
  * Support for plugin loader for Captcha adapters
  *
  * @param  string $type
  * @return IfwPsn_Vendor_Zend_Loader_PluginLoader
  * @throws IfwPsn_Vendor_Zend_Loader_Exception on invalid type.
  */
 public function getPluginLoader($type)
 {
     $type = strtoupper($type);
     if ($type == self::CAPTCHA) {
         if (!isset($this->_loaders[$type])) {
             require_once IFW_PSN_LIB_ROOT . 'IfwPsn/Vendor/Zend/Loader/PluginLoader.php';
             $this->_loaders[$type] = new IfwPsn_Vendor_Zend_Loader_PluginLoader(array('IfwPsn_Vendor_Zend_Captcha' => IFW_PSN_LIB_ROOT . 'IfwPsn/Vendor/Zend/Captcha/'));
         }
         return $this->_loaders[$type];
     } else {
         return parent::getPluginLoader($type);
     }
 }
Example #2
0
 /**
  * Get Plugin Loader
  *
  * @param  string $type
  * @return IfwPsn_Vendor_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 IFW_PSN_LIB_ROOT . 'IfwPsn/Vendor/Zend/Loader/PluginLoader.php';
         $loader = new IfwPsn_Vendor_Zend_Loader_PluginLoader(array('IfwPsn_Vendor_Zend_File_Transfer_Adapter' => IFW_PSN_LIB_ROOT . 'IfwPsn/Vendor/Zend/File/Transfer/Adapter/'));
         $this->setPluginLoader($loader, self::TRANSFER_ADAPTER);
     }
     return $this->_loaders[$type];
 }