You are here

public function ObjectManagerDecorator::find in Zircon Profile 8

Same name and namespace in other branches
  1. 8.0 vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerDecorator.php \Doctrine\Common\Persistence\ObjectManagerDecorator::find()

Finds an object by its identifier.

This is just a convenient shortcut for getRepository($className)->find($id).

Parameters

string $className The class name of the object to find.:

mixed $id The identity of the object to find.:

Return value

object The found object.

Overrides ObjectManager::find

File

vendor/doctrine/common/lib/Doctrine/Common/Persistence/ObjectManagerDecorator.php, line 40

Class

ObjectManagerDecorator
Base class to simplify ObjectManager decorators

Namespace

Doctrine\Common\Persistence

Code

public function find($className, $id) {
  return $this->wrapped
    ->find($className, $id);
}