- 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
@@ -14,6 +14,11 @@ class ObjectInstanciator {
|
||||
elseif ( ($obj = new $type() ) instanceof EntityObjectInterface ) {
|
||||
return $obj->load(...$arguments);
|
||||
}
|
||||
elseif ( ($obj = new $type() ) instanceof JsonUnserializable ) {
|
||||
$obj->jsonUnserialize(json_decode($arguments[0], true));
|
||||
|
||||
return $obj;
|
||||
}
|
||||
else {
|
||||
return new $type(...$arguments);
|
||||
}
|
||||
@@ -24,8 +29,14 @@ class ObjectInstanciator {
|
||||
if ( $obj instanceof EntityObjectInterface ) {
|
||||
return $obj->save();
|
||||
}
|
||||
|
||||
return (string) $obj;
|
||||
elseif ( $obj instanceof \JsonSerializable ) {
|
||||
return json_encode($obj->jsonSerialize());
|
||||
}
|
||||
elseif ( $obj instanceof \Stringable ) {
|
||||
return (string) $obj;
|
||||
}
|
||||
|
||||
throw new \InvalidArgumentException("Object %s could not be converted as an acceptable format.");
|
||||
}
|
||||
|
||||
public function enum(\UnitEnum $obj)
|
||||
|
||||
Reference in new issue
Block a user