Class

ezpRestPrefixFilterInterface

abstract class ezpRestPrefixFilterInterface

File containing the ezpRestPrefixFilterInterface interface

Methods

__construct(ezcMvcRequest $request, $apiPrefix)

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

filter()

Filters the request object for API provider and version token.

static int getApiVersion()

Returns the version number of the API call.

static  getApiProviderName()

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

static  getApiPrefix()

Returns a global API prefix

void filterRequestUri()

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

Details

at line 47
abstract public __construct(ezcMvcRequest $request, $apiPrefix)

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

Parameters

ezcMvcRequest $request
$apiPrefix

at line 73
abstract public filter()

Filters the request object for API provider and version token.

The API provider is by default assumed to be the first URI element. Other custom implementations of this interface are free to choose otherwise.

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.

at line 82
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.

at line 97
static public getApiProviderName()

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

at line 112
static public getApiPrefix()

Returns a global API prefix

at line 127
public void filterRequestUri()

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

Return Value

void