Esempio n. 1
0
 /**
  * @return array
  */
 public function toArray()
 {
     $return = parent::toArray();
     if ($this->intervention_type !== null) {
         if (!$this->intervention_type instanceof \Bixev\InterventionSdk\Model\InterventionType) {
             throw new \Bixev\InterventionSdk\Exception('invalid intervention_type instance (must be instanceof \\Bixev\\InterventionSdk\\InterventionType)');
         }
         $return['intervention_type'] = $this->intervention_type->toArray();
     }
     return $return;
 }
Esempio n. 2
0
 /**
  * @return array
  */
 public function toArray()
 {
     $return = parent::toArray();
     if (!empty($this->intervention_types)) {
         if (!$this->intervention_types instanceof \Bixev\InterventionSdk\Model\InterventionTypes) {
             throw new \Bixev\InterventionSdk\Exception('invalid intervention_types instance (must be instanceof \\Bixev\\InterventionSdk\\Model\\InterventionTypes');
         }
         $return['intervention_types'] = $this->intervention_types->toArray();
     }
     $return['pagination'] = $this->pagination->toArray();
     return $return;
 }