- Added ArrayOf attributes and DatasetFill/DatasetPull events. ArrayCollection is also working with ArrayOf attributes
This commit is contained in:
1 parent
fd5d31fa17
commit
009e30eb7e
21 files changed
+322
-43
No files matched your search
@@ -0,0 +1,23 @@
|
||||
<?php
|
||||
|
||||
namespace Ulmus\Entity;
|
||||
|
||||
use Ulmus\EntityCollection;
|
||||
|
||||
class ArrayCollection extends EntityCollection implements JsonUnserializable
|
||||
{
|
||||
|
||||
public function jsonUnserialize(array $json): void
|
||||
{
|
||||
$this->fromarray($json);
|
||||
}
|
||||
|
||||
public function fromArray(array $datasets, ? string /*stringable*/ $entityClass = null) : self
|
||||
{
|
||||
foreach($datasets as $dataset) {
|
||||
\ArrayObject::append($dataset);
|
||||
}
|
||||
|
||||
return $this;
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user