Cerys
6 months ago
2 changed files with 25 additions and 5 deletions
@ -0,0 +1,21 @@ |
|||||
|
<?php |
||||
|
|
||||
|
namespace Darksparrow\DeegraphPHP\DataStructures; |
||||
|
|
||||
|
class QueryResponseWrapper |
||||
|
{ |
||||
|
public array $Rows; |
||||
|
public string $RowFormat; |
||||
|
|
||||
|
public static function FromAPIResponse(string $response): QueryResponseWrapper |
||||
|
{ |
||||
|
$temp = json_decode($response, true); |
||||
|
|
||||
|
$builder = new QueryResponseWrapper(); |
||||
|
|
||||
|
$builder->Rows = $temp["@rows"]; |
||||
|
$builder->RowFormat = $temp["@row_format"]; |
||||
|
|
||||
|
return $builder; |
||||
|
} |
||||
|
} |
Loading…
Reference in new issue