예제 #1
0
 /**
  * Returns the (internal) identifier for the object, if it is known to the
  * backend. Otherwise NULL is returned.
  *
  * @param object $object
  * @return string The identifier for the object if it is known, or NULL
  */
 public function getIdentifierByObject($object)
 {
     if ($this->identityMap->hasObject($object)) {
         return $this->identityMap->getIdentifierByObject($object);
     } else {
         return NULL;
     }
 }
예제 #2
0
 /**
  * Returns the (internal) identifier for the object, if it is known to the
  * backend. Otherwise NULL is returned.
  *
  * @param object $object
  * @return string The identifier for the object if it is known, or NULL
  */
 public function getIdentifierByObject($object)
 {
     if ($object instanceof Tx_Extbase_Persistence_LazyLoadingProxy) {
         $object = $object->_loadRealInstance();
         if (!is_object($object)) {
             return NULL;
         }
     }
     if ($this->identityMap->hasObject($object)) {
         return $this->identityMap->getIdentifierByObject($object);
     } else {
         return NULL;
     }
 }