src/DataObject.php
public static function fromData(array $data)
    {
        $reflection = new \ReflectionClass(static::class);
        $instance = $reflection->newInstanceWithoutConstructor();
        $instance->data = $data;
        $instance->jsonUnserialize($data);
        return $instance;
    }
public static function fromData(array $data)
    {
        $reflection = new \ReflectionClass(static::class);
        $instance = $reflection->newInstanceWithoutConstructor();
        $instance->data = $data;
        $instance->jsonUnserialize($data);
        return $instance;
    }
public static function fromData ( array $ data ) { $ reflection = new \ ReflectionClass ( static :: class ) ; $ instance = $ reflection -> newInstanceWithoutConstructor ( ) ; $ instance -> data = $ data ; $ instance -> jsonUnserialize ( $ data ) ; return $ instance ; }
Creates a data object from an array of data.

@param array $data The array containing object data.

@return self A new object instance.
Creates a data object from an array of data .