/** * Sets validator options * * @param string|array|Zend_Config $options * @return void */ public function __construct($options) { parent::__construct($options); if (isset($options['dir'])) { $this->_dir = $options['dir']; } }
/** * Constructor retrieves the whitelist from the database if no arguments are * given. * * @param mixed $options * @return void */ public function __construct($options = null) { if (!$options) { $options = (string) get_option(self::WHITELIST_OPTION); } parent::__construct($options); $this->_messageVariables['target_extension'] = '_targetExtension'; }
/** * Sets validator options * * @param string|array|Zend_Config $options * @return void */ public function __construct($options) { if (isset($options['form_id']) && $options['form_id'] != '') { $this->_formId = $options['form_id']; } if (isset($options['field_id']) && $options['field_id'] != '') { $this->_fieldId = $options['field_id']; } $extensions = array(); parent::__construct($extensions); if (Zend_Registry::isRegistered('genericFileHelper')) { $fileHelper = Zend_Registry::get('genericFileHelper'); $paths = $fileHelper->getTmpPath(""); $fileRoot = $paths['real']; } else { $fileRoot = APPLICATION_PATH . '/../tmp/tmp_upload/1'; } $this->_dir = $fileRoot; }