Esempio n. 1
0
 /**
  * Checks if object is new or exists already in the database
  *
  * @return bool
  */
 public function isPersisted($checkDB = false)
 {
     $srl = $this->getMeta('srl');
     if (!is_numeric($this->{$srl})) {
         return false;
     }
     if ($checkDB) {
         $object = $this->repo->get($this->{$srl});
         if (!$object) {
             return false;
         }
     }
     return true;
 }