PHP Interface eZ\Publish\Core\REST\Common\RequestParser

Show file Open project: ezsystems/ezpublish-kernel Interface Usage Examples

Public Methods

Method Description
generate ( string $type, array $values = [] ) : string Generate a URL of the given type from the specified values.
parse ( string $url ) : array Parse URL and return the IDs contained in the URL.
parseHref ( string $href, string $attribute ) : mixed | false Tries to match $href as a route, and returns the value of $attribute from the result.

Method Details

generate() public method

Generate a URL of the given type from the specified values.
public generate ( string $type, array $values = [] ) : string
$type string
$values array
return string

parse() public method

Parse URL and return the IDs contained in the URL.
public parse ( string $url ) : array
$url string
return array

parseHref() public method

Tries to match $href as a route, and returns the value of $attribute from the result.
public parseHref ( string $href, string $attribute ) : mixed | false
$href string
$attribute string
return mixed | false