Class

eZ\Publish\Core\REST\Common\Input\ParserTools

class ParserTools

Tools object to be used in Input Parsers.

Methods

mixed parseObjectElement(array $objectElement, ParsingDispatcher $parsingDispatcher)

Parses the given $objectElement, if it contains embedded data.

bool isEmbeddedObject(array $objectElement)

Returns if the given $objectElement has embedded object data or is only a reference.

array parseTranslatableList(array $listElement)

Parses a translatable list, like names or descriptions.

bool parseBooleanValue(string|bool $value)

Parses a boolean from $value.

int parseStatus(string $contentTypeStatus)

Parses the content types status from $contentTypeStatus.

int parseDefaultSortField(string $defaultSortFieldString)

Parses the default sort field from the given $defaultSortFieldString.

int parseDefaultSortOrder(string $defaultSortOrderString)

Parses the default sort order from the given $defaultSortOrderString.

Limitation parseLimitation(array $limitation)

Parses the input structure to Limitation object.

Details

at line 28
public mixed parseObjectElement(array $objectElement, ParsingDispatcher $parsingDispatcher)

Parses the given $objectElement, if it contains embedded data.

Parameters

array $objectElement
ParsingDispatcher $parsingDispatcher

Return Value

mixed

at line 48
public bool isEmbeddedObject(array $objectElement)

Returns if the given $objectElement has embedded object data or is only a reference.

Parameters

array $objectElement

Return Value

bool

at line 67
public array parseTranslatableList(array $listElement)

Parses a translatable list, like names or descriptions.

Parameters

array $listElement

Return Value

array

at line 87
public bool parseBooleanValue(string|bool $value)

Parses a boolean from $value.

Parameters

string|bool $value

Return Value

bool

Exceptions

RuntimeException if the value can not be transformed to a boolean

at line 109
public int parseStatus(string $contentTypeStatus)

Parses the content types status from $contentTypeStatus.

Parameters

string $contentTypeStatus

Return Value

int

at line 130
public int parseDefaultSortField(string $defaultSortFieldString)

Parses the default sort field from the given $defaultSortFieldString.

Parameters

string $defaultSortFieldString

Return Value

int

at line 169
public int parseDefaultSortOrder(string $defaultSortOrderString)

Parses the default sort order from the given $defaultSortOrderString.

Parameters

string $defaultSortOrderString

Return Value

int

at line 188
public Limitation parseLimitation(array $limitation)

Parses the input structure to Limitation object.

Parameters

array $limitation

Return Value

Limitation