Scalr\Service\Aws\AbstractRepository::find PHP Méthode

find() public méthode

Finds one element in entity manager by its id
public find ( string $id ) : object | null
$id string Element Id (Public property of entity)
Résultat object | null Returns one object or NULL if nothing found.
    public function find($id)
    {
        $id = (array) $id;
        $em = $this->getEntityManager();
        $storage = $em->getStorage($this->getReflectionClassName());
        return isset($storage) ? $storage->find($id) : null;
    }

Usage Example

Exemple #1
0
 /**
  * Finds one element in entity manager by id
  *
  * @param    string       $id     An owner ID
  * @return   OwnerData    Returns OwnerData or NULL if nothing found.
  */
 public function find($id)
 {
     return parent::find($id);
 }