コード例 #1
0
 protected function populate(int $price_item_id, &$price_item)
 {
     if ($price_item == null) {
         $price_item = new rental_price_item($this->unmarshal($this->db->f('id'), 'int'));
         $price_item->set_title($this->unmarshal($this->db->f('title'), 'string'));
         $price_item->set_agresso_id($this->unmarshal($this->db->f('agresso_id'), 'string'));
         $price_item->set_is_area($this->unmarshal($this->db->f('is_area'), 'bool'));
         $price_item->set_is_inactive($this->unmarshal($this->db->f('is_inactive'), 'bool'));
         $price_item->set_is_adjustable($this->unmarshal($this->db->f('is_adjustable'), 'bool'));
         $price_item->set_standard($this->unmarshal($this->db->f('standard'), 'bool'));
         $price_item->set_price($this->unmarshal($this->db->f('price'), 'float'));
         $price_item->set_responsibility_id($this->unmarshal($this->db->f('responsibility_id', true), 'int'));
         $price_item->set_responsibility_title($this->unmarshal($this->db->f('resp_title', true), 'string'));
         $price_type_id = (int) $this->db->f('type');
         $price_item->set_price_type_id($price_type_id);
         $price_item->set_price_type_title($price_type_id);
     }
     return $price_item;
 }