Exemplo n.º 1
0
 /**
  * overwrite constructor to add more filters
  *
  * @param mixed $_data
  * @param bool $_bypassFilters
  * @param mixed $_convertDates
  * @return void
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     $this->_filters['budget'] = array('Digits', new Zend_Filter_Empty(NULL));
     $this->_filters['price'] = array(new Zend_Filter_PregReplace('/,/', '.'), new Zend_Filter_Empty(NULL));
     $this->_filters['is_open'] = new Zend_Filter_Empty(0);
     return parent::__construct($_data, $_bypassFilters, $_convertDates);
 }
Exemplo n.º 2
0
 /**
  * overwrite constructor to add more filters
  *
  * @param mixed $_data
  * @param bool $_bypassFilters
  * @param mixed $_convertDates
  * @return void
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     // set default value if field is empty
     $this->_filters['nat'] = new Zend_Filter_Empty('no');
     $this->_filters['cfd_time'] = new Zend_Filter_Empty(0);
     parent::__construct($_data, $_bypassFilters, $_convertDates);
 }
Exemplo n.º 3
0
 /**
  * overwrite constructor to add more filters
  *
  * @param mixed $_data
  * @param bool $_bypassFilters
  * @param mixed $_convertDates
  * @return void
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     // strip time information from datetime string
     $this->_filters['start_date'] = new Zend_Filter_PregReplace('/(\\d{4}-\\d{2}-\\d{2}).*/', '$1');
     // set start_time to NULL if not set
     $this->_filters['start_time'] = new Zend_Filter_Empty(NULL);
     return parent::__construct($_data, $_bypassFilters, $_convertDates);
 }
 /**
  * overwrite constructor to add more filters
  *
  * @param mixed $_data
  * @param bool $_bypassFilters
  * @param mixed $_convertDates
  * @return void
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     $this->_filters['emailForwardOnly'] = new Zend_Filter_Empty(0);
     $this->_filters['emailMailSize'] = new Zend_Filter_Empty(0);
     $this->_filters['emailMailQuota'] = new Zend_Filter_Empty(0);
     $this->_filters['emailForwards'] = new Zend_Filter_Empty(array());
     $this->_filters['emailAliases'] = new Zend_Filter_Empty(array());
     return parent::__construct($_data, $_bypassFilters, $_convertDates);
 }
 /**
  * overwrite default constructor as convinience for data from database
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     if (is_array($_data) && isset($_data['account_right'])) {
         $rights = explode(',', $_data['account_right']);
         $_data['view_right'] = in_array(self::VIEW_RIGHT, $rights);
         $_data['use_right'] = in_array(self::USE_RIGHT, $rights);
     }
     parent::__construct($_data, $_bypassFilters, $_convertDates);
 }
 /**
  * overwrite constructor to add more filters
  *
  * @param mixed $_data
  * @param bool $_bypassFilters
  * @param mixed $_convertDates
  * @return void
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     // set default value if field is empty
     $this->_filters['admin_mode'] = new Zend_Filter_Empty('false');
     $this->_filters['webserver_Type'] = new Zend_Filter_Empty('https');
     $this->_filters['ntp_refresh'] = new Zend_Filter_Empty(0);
     $this->_filters['http_port'] = new Zend_Filter_Empty(0);
     $this->_filters['https_port'] = new Zend_Filter_Empty(0);
     parent::__construct($_data, $_bypassFilters, $_convertDates);
 }
Exemplo n.º 7
0
 public function __construct($_data = NULL, $_bypassFilters = FALSE, $_convertDates = NULL)
 {
     $this->_validators = array('id' => array('Alnum', 'allowEmpty' => TRUE), 'account_id' => array('presence' => 'required', 'allowEmpty' => TRUE, 'default' => '0'), 'account_type' => array('presence' => 'required', array('InArray', array(Tinebase_Acl_Rights::ACCOUNT_TYPE_ANYONE, Tinebase_Acl_Rights::ACCOUNT_TYPE_USER, Tinebase_Acl_Rights::ACCOUNT_TYPE_GROUP))));
     foreach ($this->getAllGrants() as $grant) {
         $this->_validators[$grant] = array(new Zend_Validate_InArray(array(TRUE, FALSE), TRUE), 'default' => FALSE, 'presence' => 'required', 'allowEmpty' => true);
         // initialize in case validators are switched off
         $this->_properties[$grant] = FALSE;
     }
     return parent::__construct($_data, $_bypassFilters, $_convertDates);
 }
Exemplo n.º 8
0
 /**
  * overwrite default constructor as convinience for data from database
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     if (is_array($_data) && isset($_data['account_right'])) {
         $rights = explode(',', $_data['account_right']);
         $_data['view_right'] = in_array(self::VIEW_RIGHT, $rights);
         $_data['use_right'] = in_array(self::USE_RIGHT, $rights);
     }
     /**
      * account_id needs to be string, but 0 is coming as int. Cast it.
      */
     if (is_int($_data['account_id'])) {
         $_data['account_id'] = (string) $_data['account_id'];
     }
     parent::__construct($_data, $_bypassFilters, $_convertDates);
 }
Exemplo n.º 9
0
 /**
  * overwrite constructor to add more filters
  *
  * @param mixed $_data
  * @param bool $_bypassFilters
  * @param mixed $_convertDates
  * @return void
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     // set default value if field is empty
     $this->_filters['web_language'] = new Zend_Filter_Empty('English');
     $this->_filters['language'] = new Zend_Filter_Empty('English');
     $this->_filters['display_method'] = new Zend_Filter_Empty('full_contact');
     $this->_filters['mwi_notification'] = new Zend_Filter_Empty('silent');
     $this->_filters['mwi_dialtone'] = new Zend_Filter_Empty('normal');
     $this->_filters['headset_device'] = new Zend_Filter_Empty('none');
     $this->_filters['message_led_other'] = new Zend_Filter_Empty(0);
     $this->_filters['global_missed_counter'] = new Zend_Filter_Empty(0);
     $this->_filters['scroll_outgoing'] = new Zend_Filter_Empty(0);
     $this->_filters['show_local_line'] = new Zend_Filter_Empty(0);
     $this->_filters['show_call_status'] = new Zend_Filter_Empty(0);
     $this->_filters['call_waiting'] = new Zend_Filter_Empty('on');
     parent::__construct($_data, $_bypassFilters, $_convertDates);
 }
 /**
  * overwrite constructor to add more filters
  *
  * @param mixed $_data
  * @param bool $_bypassFilters
  * @param mixed $_convertDates
  * @return void
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     // set default value if field is empty
     $this->_filters['attach'] = new Zend_Filter_Empty(0);
     $this->_filters['saycid'] = new Zend_Filter_Empty(0);
     $this->_filters['review'] = new Zend_Filter_Empty(0);
     $this->_filters['operator'] = new Zend_Filter_Empty(0);
     $this->_filters['envelope'] = new Zend_Filter_Empty(0);
     $this->_filters['sayduration'] = new Zend_Filter_Empty(0);
     $this->_filters['saydurationm'] = new Zend_Filter_Empty(0);
     $this->_filters['sendvoicemail'] = new Zend_Filter_Empty(0);
     $this->_filters['delete'] = new Zend_Filter_Empty(0);
     $this->_filters['nextaftercmd'] = new Zend_Filter_Empty(0);
     $this->_filters['forcename'] = new Zend_Filter_Empty(0);
     $this->_filters['forcegreetings'] = new Zend_Filter_Empty(0);
     $this->_filters['hidefromdir'] = new Zend_Filter_Empty(0);
     parent::__construct($_data, $_bypassFilters, $_convertDates);
 }
Exemplo n.º 11
0
 /**
  * overwrite constructor to add more filters
  *
  * @param mixed $_data
  * @param bool $_bypassFilters
  * @param mixed $_convertDates
  * @return void
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     // do something here if you like (add default empty values, ...)
     return parent::__construct($_data, $_bypassFilters, $_convertDates);
 }
 /**
  * Default constructor
  * Constructs an object and sets its record related properties.
  *
  * @param mixed $_data
  * @param bool $bypassFilters sets {@see this->bypassFilters}
  * @param mixed $convertDates sets {@see $this->convertDates} and optionaly {@see $this->$dateConversionFormat}
  * @return void
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     $this->_validators = array_merge($this->_validators, $this->_additionalValidators);
     parent::__construct($_data, $_bypassFilters, $_convertDates);
 }
 /**
  * the constructor
  * it is needed because we have more validation fields in Calendars
  * 
  * @param mixed $_data
  * @param bool $bypassFilters sets {@see this->bypassFilters}
  * @param bool $convertDates sets {@see $this->convertDates}
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     $this->_filters['organizer'] = new Zend_Filter_Empty(NULL);
     parent::__construct($_data, $_bypassFilters, $_convertDates);
 }
 /**
  * overwrite constructor to add more filters
  *
  * @param mixed $_data
  * @param bool $_bypassFilters
  * @param mixed $_convertDates
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     // set geofields to NULL if empty
     $geoFields = array('adr_one_lon', 'adr_one_lat', 'adr_two_lon', 'adr_two_lat');
     foreach ($geoFields as $geoField) {
         $this->_filters[$geoField] = new Zend_Filter_Empty(NULL);
     }
     parent::__construct($_data, $_bypassFilters, $_convertDates);
 }
Exemplo n.º 15
0
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     parent::__construct($_data, $_bypassFilters, $_convertDate);
     // set default value for allow automatic booking
     $this->allowBooking();
 }
Exemplo n.º 16
0
 /**
  * overwrite constructor to add more filters
  *
  * @param mixed $_data
  * @param bool $_bypassFilters
  * @param mixed $_convertDates
  * @return void
  */
 public function __construct($_data = NULL, $_bypassFilters = FALSE, $_convertDates = TRUE)
 {
     $this->_filters['size'] = new Zend_Filter_Empty(0);
     return parent::__construct($_data, $_bypassFilters, $_convertDates);
 }
 /**
  * @see Tinebase_Record_Abstract
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = NULL)
 {
     $this->_validators = array('id' => array('allowEmpty' => TRUE), 'application_id' => array('Alnum', 'presence' => 'required'), 'account_id' => array('presence' => 'required', 'allowEmpty' => TRUE, 'default' => '0'), 'account_type' => array(new Zend_Validate_InArray(array(Tinebase_Acl_Rights::ACCOUNT_TYPE_USER, Tinebase_Acl_Rights::ACCOUNT_TYPE_GROUP, Tinebase_Acl_Rights::ACCOUNT_TYPE_ANYONE))), 'right' => array('presence' => 'required'));
     return parent::__construct($_data, $_bypassFilters);
 }
 /**
  * @see Tinebase_Record_Abstract
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     $this->_validators = array('id' => array(Zend_Filter_Input::ALLOW_EMPTY => true), 'container_id' => array('allowEmpty' => true), 'list_id' => array('allowEmpty' => true), 'name' => array('presence' => 'required'), 'description' => array(Zend_Filter_Input::ALLOW_EMPTY => true), 'members' => array(Zend_Filter_Input::ALLOW_EMPTY => true, Zend_Filter_Input::DEFAULT_VALUE => array()), 'email' => array('allowEmpty' => true), 'visibility' => array(new Zend_Validate_InArray(array(self::VISIBILITY_HIDDEN, self::VISIBILITY_DISPLAYED)), Zend_Filter_Input::DEFAULT_VALUE => self::VISIBILITY_DISPLAYED), 'created_by' => array('allowEmpty' => true), 'creation_time' => array('allowEmpty' => true), 'last_modified_by' => array('allowEmpty' => true), 'last_modified_time' => array('allowEmpty' => true), 'is_deleted' => array('allowEmpty' => true), 'deleted_time' => array('allowEmpty' => true), 'deleted_by' => array('allowEmpty' => true), 'seq' => array('allowEmpty' => true));
     parent::__construct($_data, $_bypassFilters, $_convertDates);
 }
 /**
  * overwrite constructor to add more filters
  *
  * @param mixed $_data
  * @param bool $_bypassFilters
  * @param mixed $_convertDates
  * @return void
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     // set some fields to default if not set
     $this->_filters['ssl'] = array(new Zend_Filter_Empty(self::SECURE_TLS), 'StringTrim', 'StringToLower');
     $this->_filters['smtp_ssl'] = array(new Zend_Filter_Empty(self::SECURE_TLS), 'StringTrim', 'StringToLower');
     $this->_filters['sieve_ssl'] = array(new Zend_Filter_Empty(self::SECURE_TLS), 'StringTrim', 'StringToLower');
     $this->_filters['display_format'] = array(new Zend_Filter_Empty(self::DISPLAY_HTML), 'StringTrim', 'StringToLower');
     $this->_filters['port'] = new Zend_Filter_Empty(NULL);
     $this->_filters['smtp_port'] = new Zend_Filter_Empty(NULL);
     $this->_filters['sieve_port'] = new Zend_Filter_Empty(NULL);
     return parent::__construct($_data, $_bypassFilters, $_convertDates);
 }
 /**
  * overwrite constructor to add more filters
  *
  * @param mixed $_data
  * @param bool $_bypassFilters
  * @param mixed $_convertDates
  * @return void
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     // set turnover to 0 if not set
     $this->_filters['turnover'] = new Zend_Filter_Empty(0);
     parent::__construct($_data, $_bypassFilters, $_convertDates);
 }
 /**
  * @see /Tinebase/Record/Abstract::__construct
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     $rruleString = NULL;
     if (is_string($_data)) {
         $rruleString = $_data;
         $_data = NULL;
     }
     parent::__construct($_data, $_bypassFilters, $_convertDates);
     if ($rruleString) {
         $this->setFromString($rruleString);
     }
 }
 /**
  * @see Tinebase_Record_Abstract
  */
 public function __construct($_data = NULL, $_bypassFilters = false, $_convertDates = true)
 {
     $this->_validators = array('id' => array('allowEmpty' => true), 'name' => array('presence' => 'required'), 'status' => array(array('InArray', array('enabled', 'disabled'))), 'order' => array('Digits', 'presence' => 'required'), 'tables' => array('allowEmpty' => true), 'version' => array('presence' => 'required'));
     return parent::__construct($_data, $_bypassFilters, $_convertDates);
 }