@@ 1611-1618 (lines=8) @@ | ||
1608 | * |
|
1609 | * @return object|bool The found entity or FALSE. |
|
1610 | */ |
|
1611 | public function tryGetByIdHash($idHash, $rootClassName) |
|
1612 | { |
|
1613 | $stringIdHash = (string) $idHash; |
|
1614 | ||
1615 | return isset($this->identityMap[$rootClassName][$stringIdHash]) |
|
1616 | ? $this->identityMap[$rootClassName][$stringIdHash] |
|
1617 | : false; |
|
1618 | } |
|
1619 | ||
1620 | /** |
|
1621 | * Checks whether an entity is registered in the identity map of this UnitOfWork. |
|
@@ 2993-3000 (lines=8) @@ | ||
2990 | * @return object|bool Returns the entity with the specified identifier if it exists in |
|
2991 | * this UnitOfWork, FALSE otherwise. |
|
2992 | */ |
|
2993 | public function tryGetById($id, $rootClassName) |
|
2994 | { |
|
2995 | $idHash = implode(' ', (array) $id); |
|
2996 | ||
2997 | return isset($this->identityMap[$rootClassName][$idHash]) |
|
2998 | ? $this->identityMap[$rootClassName][$idHash] |
|
2999 | : false; |
|
3000 | } |
|
3001 | ||
3002 | /** |
|
3003 | * Schedules an entity for dirty-checking at commit-time. |