Interface

eZ\Publish\API\Repository\URLWildcardService

interface URLWildcardService

URLAlias service.

Methods

UrlWildcard create(string $sourceUrl, string $destinationUrl, bool $forward = false)

Creates a new url wildcard.

remove(URLWildcard $urlWildcard)

Removes an url wildcard.

UrlWildcard load(mixed $id)

Loads a url wild card.

UrlWildcard[] loadAll(int $offset, int $limit = -1)

Loads all url wild card (paged).

URLWildcardTranslationResult translate(mixed $url)

Translates an url to an existing uri resource based on the source/destination patterns of the url wildcard.

Details

at line 35
public UrlWildcard create(string $sourceUrl, string $destinationUrl, bool $forward = false)

Creates a new url wildcard.

Parameters

string $sourceUrl
string $destinationUrl
bool $forward

Return Value

UrlWildcard

Exceptions

InvalidArgumentException if the $sourceUrl pattern already exists
UnauthorizedException if the user is not allowed to create url wildcards
ContentValidationException if the number of "*" patterns in $sourceUrl and the number of {\d} placeholders in $destinationUrl doesn't match or if the placeholders aren't a valid number sequence({1}/{2}/{3}), starting with 1.

at line 44
public remove(URLWildcard $urlWildcard)

Removes an url wildcard.

Parameters

URLWildcard $urlWildcard the url wildcard to remove

Exceptions

UnauthorizedException if the user is not allowed to remove url wildcards

at line 55
public UrlWildcard load(mixed $id)

Loads a url wild card.

Parameters

mixed $id

Return Value

UrlWildcard

Exceptions

NotFoundException if the url wild card was not found

at line 65
public UrlWildcard[] loadAll(int $offset, int $limit = -1)

Loads all url wild card (paged).

Parameters

int $offset
int $limit

Return Value

UrlWildcard[]

at line 77
public URLWildcardTranslationResult translate(mixed $url)

Translates an url to an existing uri resource based on the source/destination patterns of the url wildcard.

Parameters

mixed $url

Return Value

URLWildcardTranslationResult

Exceptions

NotFoundException if the url could not be translated