Ejemplo n.º 1
0
 /**
  * update
  *
  * @param Site $site site entity object
  *
  * @return Site
  */
 public function update(Site $site)
 {
     $diff = $site->diff();
     if (count($diff) > 0) {
         $this->conn->table($this->table)->where('siteKey', $site->siteKey)->update($diff);
     }
     return $this->createModel(array_merge($site->getAttributes(), $diff));
 }