예제 #1
0
 /**
  * Construct this job.
  * 
  * Sets properties needed during the process.
  */
 public function __construct(array $options)
 {
     parent::__construct($options);
     // Set the storage.
     $this->_storage = Zend_Registry::get('storage');
     if (!$this->_storage->getAdapter() instanceof Omeka_Storage_Adapter_Filesystem) {
         throw new Omeka_Storage_Exception(__('The storage adapter is not an instance of Omeka_Storage_Adapter_Filesystem.'));
     }
     // Set the image creator.
     try {
         $this->_imageCreator = Zend_Registry::get('file_derivative_creator');
     } catch (Zend_Exception $e) {
         throw new Omeka_File_Derivative_Exception(__('The ImageMagick directory path is missing.'));
     }
     // Set the configured derivative types and constraints.
     foreach ($this->_validDerivativeTypes as $type) {
         if (!is_array($this->_options['derivative_types']) || in_array($type, $this->_options['derivative_types'])) {
             $this->_derivatives[$type] = get_option("{$type}_constraint");
         }
     }
 }
예제 #2
0
 public function __construct(array $options)
 {
     $this->_method = self::METHOD_START;
     parent::__construct($options);
 }
예제 #3
0
파일: Mock.php 프로젝트: lchen01/STEdwards
 public function __construct(array $options)
 {
     $this->options = $options;
     parent::__construct($options);
 }