Beispiel #1
0
 public function setOptions(array $options = array())
 {
     parent::setOptions($options);
     foreach ($this->_config as $name => $value) {
         switch ($name) {
             case 'resnum':
                 $this->order_id = $value;
                 break;
             case 'refnum':
                 $this->ref_id = $value;
                 break;
         }
     }
 }
Beispiel #2
0
 public function setOptions(array $options = [])
 {
     parent::setOptions($options);
     foreach ($this->_config as $name => $value) {
         switch ($name) {
             case 'in':
                 if (preg_match('/^[a-z0-9]+$/', $value)) {
                     $this->order_id = $value;
                 }
                 break;
             case 'au':
                 if (preg_match('/^[a-z0-9]+$/', $value)) {
                     $this->authority = $value;
                 }
                 break;
             case 'rs':
                 if ($value !== '0') {
                     throw new Exception('Invalid Request at ' . __METHOD__);
                 } else {
                     $this->state = '0';
                 }
         }
     }
 }