- Added a new MsSQL adapter

- Some bugfixes were made within annotations.
- Added a new Object Instanciator which allows to manipulate and define how an object from an entity must be instanciated with given value.
This commit is contained in:
Dave Mc Nicoll committed 2020-01-29 16:11:16 -05:00
1 parent 9df7e65dcf
commit 5bd60129ea
22 files changed
+547 -103

No files matched your search

+11 -2
View File
@@ -4,9 +4,7 @@ namespace Ulmus;
use Generator;
#class EntityCollection implements \Countable, \ArrayAccess
class EntityCollection extends \ArrayObject {
# use Common\ArrayObjectTrait;
public function filters(Callable $callback) : Generator
{
@@ -20,4 +18,15 @@ class EntityCollection extends \ArrayObject {
}
}
}
public function buildArray(string $keyColumn, string $valueColumn) : array
{
$list = [];
foreach($this as $key => $item) {
$list[$item->$keyColumn] = $item->$valueColumn;
}
return $list;
}
}