Esempio n. 1
0
 /**
  * Checks if atom exists in database
  * @return boolean
  */
 public function atomExists()
 {
     if ($this->concept->inAtomCache($this)) {
         // $this->logger->debug("#217 One query saved due to caching existing atoms that exist in database");
         return true;
     } elseif ($this->id === '_NEW') {
         return true;
         // Return true if id is '_NEW' (special case)
     } elseif ($this->database->atomExists($this)) {
         $this->concept->addToAtomCache($this);
         return true;
     } else {
         return false;
     }
 }