public function findByIdentifier($identifier)
    {
        $object = $this->persistenceManager->getObjectByIdentifier($identifier, $this->entityClassName);
        if ($object === null) {
            foreach ($this->addedResources as $addedResource) {
                if ($this->persistenceManager->getIdentifierByObject($addedResource) === $identifier) {
                    $object = $addedResource;
                    break;
                }
            }
        }

        return $object;
    }
public function findByIdentifier($identifier)
    {
        $object = $this->persistenceManager->getObjectByIdentifier($identifier, $this->entityClassName);
        if ($object === null) {
            foreach ($this->addedResources as $addedResource) {
                if ($this->persistenceManager->getIdentifierByObject($addedResource) === $identifier) {
                    $object = $addedResource;
                    break;
                }
            }
        }

        return $object;
    }
public function findByIdentifier ( $ identifier ) { $ object = $ this -> persistenceManager -> getObjectByIdentifier ( $ identifier , $ this -> entityClassName ) ; if ( $ object === null ) { foreach ( $ this -> addedResources as $ addedResource ) { if ( $ this -> persistenceManager -> getIdentifierByObject ( $ addedResource ) === $ identifier ) { $ object = $ addedResource ; break ; } } } return $ object ; }
Finds an object matching the given identifier.

@param mixed $identifier The identifier of the object to find
@return object The matching object if found, otherwise NULL
@api
Finds an object matching the given identifier .