bridge/doctrine-collections/lib/CollectionsAgent.php 1 location
|
@@ 59-72 (lines=14) @@
|
56 |
|
/** |
57 |
|
* {@inheritdoc} |
58 |
|
*/ |
59 |
|
public function find($identifier, string $classFqn = null) |
60 |
|
{ |
61 |
|
if (null === $classFqn) { |
62 |
|
throw BadMethodCallException::classArgumentIsMandatory(__CLASS__); |
63 |
|
} |
64 |
|
|
65 |
|
$object = $this->store->find($classFqn, $identifier); |
66 |
|
|
67 |
|
if (null === $object) { |
68 |
|
throw ObjectNotFoundException::forClassAndIdentifier($classFqn, $identifier); |
69 |
|
} |
70 |
|
|
71 |
|
return $object; |
72 |
|
} |
73 |
|
|
74 |
|
/** |
75 |
|
* {@inheritdoc} |
bridge/doctrine-orm/lib/OrmAgent.php 1 location
|
@@ 60-73 (lines=14) @@
|
57 |
|
/** |
58 |
|
* {@inheritdoc} |
59 |
|
*/ |
60 |
|
public function find($identifier, string $class = null) |
61 |
|
{ |
62 |
|
if (null === $class) { |
63 |
|
throw BadMethodCallException::classArgumentIsMandatory(__CLASS__); |
64 |
|
} |
65 |
|
|
66 |
|
$object = $this->entityManager->find($class, $identifier); |
67 |
|
|
68 |
|
if (null === $object) { |
69 |
|
throw ObjectNotFoundException::forClassAndIdentifier($class, $identifier); |
70 |
|
} |
71 |
|
|
72 |
|
return $object; |
73 |
|
} |
74 |
|
|
75 |
|
/** |
76 |
|
* {@inheritdoc} |