20250622#5
This commit is contained in:
@@ -12,7 +12,7 @@ abstract class AbstractDTO extends AbstractObjectData {
|
|||||||
* @return static
|
* @return static
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
final public static function fromData(array|object ...$data) : static {
|
public static function fromData(array|object ...$data) : static {
|
||||||
$array = array_map(function($item) {
|
$array = array_map(function($item) {
|
||||||
return (is_object($item)) ? get_object_vars($item) : $item;
|
return (is_object($item)) ? get_object_vars($item) : $item;
|
||||||
}, $data);
|
}, $data);
|
||||||
@@ -24,7 +24,7 @@ abstract class AbstractDTO extends AbstractObjectData {
|
|||||||
* @return static
|
* @return static
|
||||||
* @throws Exception
|
* @throws Exception
|
||||||
*/
|
*/
|
||||||
final public static function fromObject(object $data) : static {
|
public static function fromObject(object $data) : static {
|
||||||
return self::fromArray(get_object_vars($data));
|
return self::fromArray(get_object_vars($data));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user