Esempio n. 1
0
 /**
  * Constructor
  * 
  * @param Engine_Package_Manager_Operation_Abstract $operation
  * @param Zend_Db_Adapter_Abstract $db
  * @param array $options
  */
 public final function __construct(Engine_Package_Manager_Operation_Abstract $operation, array $options = null)
 {
     $this->_operation = $operation;
     $this->_name = $operation->getPrimaryPackage()->getName();
     if (is_array($options)) {
         $this->setOptions($options);
     }
     $this->init();
 }
Esempio n. 2
0
 public function getInstaller($class, Engine_Package_Manager_Operation_Abstract $operation, array $params = null)
 {
     $key = $operation->getKey();
     if (!isset($this->_installers[$key])) {
         if (!class_exists($class)) {
             // Forces autoload
             throw new Engine_Package_Installer_Exception(sprintf('Unable to load installer class %s', $class));
         }
         $params['db'] = $this->getDb();
         $params['vfs'] = $this->getVfs();
         $this->_installers[$key] = new $class($operation, $params);
     }
     return $this->_installers[$key];
 }