/** * Returns the object with the (internal) identifier, if it is known to the * backend. Otherwise NULL is returned. * * @param string $identifier * @return object The object for the identifier if it is known, or NULL * @author Karsten Dambekalns <*****@*****.**> * @api */ public function getObjectByIdentifier($identifier) { if ($this->persistenceSession->hasIdentifier($identifier)) { return $this->persistenceSession->getObjectByIdentifier($identifier); } else { $objectData = $this->backend->getObjectDataByIdentifier($identifier); if ($objectData !== FALSE) { return $this->dataMapper->mapToObject($objectData); } else { return NULL; } } }
/** * Executes the query and returns the result * * @return array The query result * @author Karsten Dambekalns <*****@*****.**> * @api */ public function execute() { return $this->dataMapper->mapToObjects($this->persistenceManager->getBackend()->getObjectDataByQuery($this)); }