Ejemplo n.º 1
0
 public function __construct($data = [])
 {
     parent::__construct($data);
     if (empty($this->pass)) {
         $this->setPass(self::generateRandomString(4));
     }
 }
Ejemplo n.º 2
0
 public function toArray()
 {
     $data = parent::toArray();
     if ($this->birthDay instanceof \DateTime) {
         $data['birthDay'] = $this->birthDay->format('Y-m-d');
     }
     return $data;
 }
Ejemplo n.º 3
0
 public function toArray()
 {
     $data = parent::toArray();
     $data['start'] = isset($this->start) ? $this->start->format('Y-m-d H:i:s') : '';
     $data['end'] = isset($this->end) ? $this->end->format('Y-m-d H:i:s') : '';
     $data['client'] = isset($this->client) ? $this->client->toArray() : [];
     $data['title'] = isset($this->orderId) ? $this->orderId : '';
     return $data;
 }