Class

eZ\Publish\Core\REST\Common\RequestParser\EzPublish

class EzPublish extends Pattern

Pattern based Request parser pre-configured for eZ Publish.

Constants

STANDARD_VARIABLE_REGEX

Pattern regular sub-expression.

SLASHES_VARIABLE_REGEX

Pattern regular sub-expression that might contain slashes.

Methods

__construct(array $map = array())

Construct from optional initial map.

from Pattern
addPattern(string $type, string $pattern)

Adds a pattern for a type.

from Pattern
array parse(string $url)

Parse URL and return the IDs contained in the URL.

from Pattern
string generate(string $type, array $values = array())

Generate a URL of the given type from the specified values.

from Pattern
mixed|false parseHref(string $href, string $attribute)

Tries to match $href as a route, and returns the value of $attribute from the result.

from Pattern

Details

in Pattern at line 55
public __construct(array $map = array())

Construct from optional initial map.

Parameters

array $map

in Pattern at line 68
public addPattern(string $type, string $pattern)

Adds a pattern for a type.

Parameters

string $type
string $pattern

in Pattern at line 82
public array parse(string $url)

Parse URL and return the IDs contained in the URL.

Parameters

string $url

Return Value

array

in Pattern at line 153
public string generate(string $type, array $values = array())

Generate a URL of the given type from the specified values.

Parameters

string $type
array $values

Return Value

string

in Pattern at line 183
public mixed|false parseHref(string $href, string $attribute)

Tries to match $href as a route, and returns the value of $attribute from the result.

Parameters

string $href
string $attribute

Return Value

mixed|false