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