Class

eZ\Bundle\EzPublishRestBundle\RequestParser\Router

class Router implements RequestParser

Router based request parser.

Methods

__construct(RouterInterface $router)

array parse(string $url)

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

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

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

Details

at line 27
public __construct(RouterInterface $router)

Parameters

RouterInterface $router

at line 35
public array parse(string $url)

Parameters

string $url

Return Value

array

Exceptions

ResourceNotFoundException If no match was found

at line 62
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

at line 70
public mixed|false parseHref(string $href, string $attribute)

Parameters

string $href
string $attribute

Return Value

mixed|false

Exceptions

InvalidArgumentException If $attribute wasn't found in the match