Documentation

DataSchema
in package

Modify the Data Schema.

Table of Contents

Properties

$replace  : DataSchemaReplace|null

Methods

__construct()  : mixed
__toString()  : string
toJson()  : array<string|int, mixed>
fixLineSpaces()  : string
Doubles the number of spaces in front of each line if it has at least two.
toJsonStringProperSpacing()  : string
Ensures proper spacing in JSON string.

Properties

Methods

__construct()

public __construct(array<string|int, mixed>|string|DataSchema $dataSchema) : mixed
Parameters
$dataSchema : array<string|int, mixed>|string|DataSchema

Raw server response array.

Tags
throws
InvalidArgumentException

Throws if the data schema is invalid.

__toString()

public __toString() : string
Return values
string

String representation.

toJson()

public toJson() : array<string|int, mixed>
Return values
array<string|int, mixed>

JSON representation.

fixLineSpaces()

Doubles the number of spaces in front of each line if it has at least two.

private static fixLineSpaces(string $line) : string
Parameters
$line : string

Line to fix.

Return values
string

Fixed line.

toJsonStringProperSpacing()

Ensures proper spacing in JSON string.

private toJsonStringProperSpacing() : string
Return values
string

Properly spaced JSON string.


        
On this page

Search results