eZ Publish Community Project (Legacy Stack) 2013.4
Class

ezpRestDefaultRegexpPrefixFilter

class ezpRestDefaultRegexpPrefixFilter extends ezpRestPrefixFilterInterface

Default implementation of prefix filter interface.

Methods

__construct(ezcMvcRequest $request, string $apiPrefix)

Creates a new VersionToken object which describes the version token in API strings.

void filter()

Filters the request object for API provider name and version token.

static int getApiVersion()

Returns the version number of the API call.

from ezpRestPrefixFilterInterface
static  getApiProviderName()

Returns the name of the referenced API provider for the current query.

from ezpRestPrefixFilterInterface
static  getApiPrefix()

Returns a global API prefix

from ezpRestPrefixFilterInterface
void filterRequestUri()

Filters the URI property of the given ezcMvcRequest object, removing any version token from it.

from ezpRestPrefixFilterInterface

Details

at line 28
public __construct(ezcMvcRequest $request, string $apiPrefix)

Creates a new VersionToken object which describes the version token in API strings.

Parameters

ezcMvcRequest $request
string $apiPrefix

at line 68
public void filter()

Filters the request object for API provider name and version token.

API provider name is assumed to be the first URI element.

If version token exists, gets the numerical value of this token, and filters the URI in the request object, removing said token.

This lets us not to deal with any version token data, in our route definitions. This is a benefit, since different systems, might have different preferences for what the version token should look like.

Return Value

void

static public int getApiVersion()

Returns the version number of the API call.

If no version is found in the request, it defaults to '1'.

Return Value

int The version number of the API call.

static public getApiProviderName()

Returns the name of the referenced API provider for the current query.

static public getApiPrefix()

Returns a global API prefix

public void filterRequestUri()

Filters the URI property of the given ezcMvcRequest object, removing any version token from it.

Return Value

void