- Bugfix within PdoObject and Repository
- Added some utilities methods to EntityCollection
This commit is contained in:
1 parent
d03f9ece36
commit
4b29232543
3 files changed
+13
-4
No files matched your search
@@ -30,12 +30,14 @@ class EntityCollection extends \ArrayObject {
|
||||
return $collection;
|
||||
}
|
||||
|
||||
public function searchOne($value, string $field) : object
|
||||
public function searchOne($value, string $field) : ? object
|
||||
{
|
||||
# Returning first value only
|
||||
foreach($this->search($value, $field) as $item) {
|
||||
return $item;
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
public function search($value, string $field) : Generator
|
||||
|
||||
Reference in new issue
Block a user