public function __construct()
 {
     if (!is_array($this->fields) and empty($this->fields)) {
         $this->fields['PARTNER_AUTH_KEY'] = array(56, array('is_string', 'isCleanHtml'), true);
         $this->fields['site_url'] = array(200, array('is_string', 'isUrl'), true);
         $this->fields['feed_url'] = array(200, array('is_string', 'isUrl'), true);
         $this->fields['country'] = array(2, array('is_string', 'isCountryName'), true);
         $this->fields['site_id'] = array(32, array('is_string', 'isCleanHtml'));
         $this->fields['site_name'] = array(100, array('is_string', 'isCleanHtml'));
         $this->fields['firstname'] = array(100, array('is_string', 'isCleanHtml'));
         $this->fields['lastname'] = array(100, array('is_string', 'isCleanHtml'));
         $this->fields['civility'] = array(40, array('is_string', 'isCleanHtml'));
         $this->fields['position'] = array(100, array('is_string', 'isCleanHtml'));
         $this->fields['email'] = array(100, array('is_string', 'isEmail'));
         $this->fields['phone'] = array(30, array('is_string', 'isPhoneNumber'));
         $this->fields['mobile'] = array(30, array('is_string', 'isPhoneNumber'));
         $this->fields['organisation_name'] = array(100, array('is_string', 'isCleanHtml'));
         $this->fields['legaltype'] = array(30, array('is_string', 'isCleanHtml'));
         $this->fields['address'] = array(100, array('is_string', 'isCleanHtml'));
         $this->fields['postal_code'] = array(10, array('is_string', 'isCleanHtml'));
         $this->fields['city'] = array(30, array('is_string', 'isCityName'));
         $this->fields['module_version'] = array(10, array('is_string', 'isCleanHtml'));
         $this->fields['platform_version'] = array(12, array('is_string', 'isCleanHtml'));
     }
     parent::__construct();
 }
 public function __construct()
 {
     if (!is_array($this->fields) and empty($this->fields)) {
         // required
         $this->fields['PARTNER_AUTH_KEY'] = array(56, array('is_string', 'isCleanHtml'), true);
         $this->fields['key'] = array(32, array('is_string', 'isCleanHtml'), true);
         $this->fields['total_ht'] = array(0, array('isFloat'), true);
         $this->fields['order_id'] = array(40, array('isInt'));
         $this->fields['user_id'] = array(40, array('isInt'));
         $this->fields['cli_email'] = array(100, array('isEmail'));
         $this->fields['basket_id'] = array(40, array('isInt'));
         // optionnals
         $this->fields['currency'] = array(40, array('is_string', 'isCleanHtml'));
         $this->fields['total_ttc'] = array(0, array('isFloat'));
         $this->fields['shipping'] = array(0, array('isFloat'));
         $this->fields['tax'] = array(0, array('isFloat'));
         $this->fields['tva'] = array(0, array('isFloat'));
         $this->fields['cli_firstname'] = array(0, array('is_string', 'isCleanHtml'));
         $this->fields['cli_lastname'] = array(0, array('is_string', 'isCleanHtml'));
         $this->fields['cli_city'] = array(0, array('is_string', 'isCleanHtml'));
         $this->fields['cli_state'] = array(0, array('is_string', 'isCleanHtml'));
         $this->fields['cli_country'] = array(0, array('is_string', 'isCleanHtml'));
         $this->fields['cli_segment'] = array(0, array('is_string', 'isCleanHtml'));
         $this->fields['payement_method'] = array(0, array('is_string', 'isCleanHtml'));
         // Array of items
         $this->fields['items'] = array(0, array('is_array', 'isItemsOrder'));
     }
     parent::__construct();
 }
 /**
  * (non-PHPdoc)
  * @see TwengaFields::checkParams()
  */
 public function checkParams()
 {
     parent::checkParams();
     if (isset($this->fields['items']) && !empty($this->fields['items'])) {
         self::isItemsOrder($this->fields['items']);
     }
 }
 public function __construct()
 {
     if (!is_array($this->fields) and empty($this->fields)) {
         $this->fields['key'] = array(32, array('is_string', 'isCleanHtml'), true);
         $this->fields['PARTNER_AUTH_KEY'] = array(56, array('is_string', 'isCleanHtml'), true);
     }
     parent::__construct();
 }
 public function __construct()
 {
     if (!is_array($this->fields) and empty($this->fields)) {
         $this->fields['key'] = array(32, array('is_string', 'isCleanHtml'), true);
         $this->fields['PARTNER_AUTH_KEY'] = array(56, array('is_string', 'isCleanHtml'), true);
         $this->fields['order_id'] = array(40, array('isInt'));
         $this->fields['user_id'] = array(40, array('isInt'));
         $this->fields['cli_email'] = array(100, array('isEmail'));
         $this->fields['basket_id'] = array(40, array('isInt'));
     }
     parent::__construct();
 }