Пример #1
0
 public function update(array $data, array $identifier)
 {
     $today = new \DateTime();
     $data['name'] = $this->parts[$data['weight']];
     $data['updated_at'] = $today->format('Y-m-d H:i:s');
     parent::update($data, $identifier);
 }
Пример #2
0
 public function insert(array $data)
 {
     if (!isset($data['created_at'])) {
         $today = new \DateTime();
         $data['created_at'] = $today->format('Y-m-d H:i:s');
     }
     $data['updated_at'] = '';
     parent::insert($data);
 }
Пример #3
0
 public function insert(array $data)
 {
     if (!isset($data['created_at'])) {
         $today = new \DateTime();
         $data['created_at'] = $today->format('Y-m-d H:i:s');
     }
     $data['updated_at'] = '';
     $data['confirmation_token'] = $this->createHash();
     return parent::insert($data);
 }