public function ObjectManagerDecorator::find in Plug 7
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
- lib/
doctrine/ common/ lib/ Doctrine/ Common/ Persistence/ ObjectManagerDecorator.php, line 40
Class
- ObjectManagerDecorator
- Base class to simplify ObjectManager decorators
Namespace
Doctrine\Common\PersistenceCode
public function find($className, $id) {
return $this->wrapped
->find($className, $id);
}