eZPublish  4.7
ezpRestDefaultRegexpPrefixFilter Class Reference

Default implementation of prefix filter interface. More...

+ Inheritance diagram for ezpRestDefaultRegexpPrefixFilter:
+ Collaboration diagram for ezpRestDefaultRegexpPrefixFilter:

Public Member Functions

 __construct (ezcMvcRequest $request, $apiPrefix)
 Creates a new VersionToken object which describes the version token in API strings. More...
 
 filter ()
 Filters the request object for API provider name and version token. More...
 
- Public Member Functions inherited from ezpRestPrefixFilterInterface
 __construct (ezcMvcRequest $request, $apiPrefix)
 Creates a new VersionToken object which describes the version token in API strings. More...
 
 filter ()
 Filters the request object for API provider and version token. More...
 
 filterRequestUri ()
 Filters the URI property of the given ezcMvcRequest object, removing any version token from it. More...
 

Protected Member Functions

 getPrefixPattern ()
 
 parseVersionValue ()
 Returns the numerical version of the version token. More...
 
- Protected Member Functions inherited from ezpRestPrefixFilterInterface
 parseVersionValue ()
 Returns the numerical version of the version token. More...
 

Protected Attributes

 $apiPart
 
- Protected Attributes inherited from ezpRestPrefixFilterInterface
 $apiProviderToken
 
 $request
 
 $versionToken
 

Additional Inherited Members

- Static Public Member Functions inherited from ezpRestPrefixFilterInterface
static getApiPrefix ()
 Returns a global API prefix. More...
 
static getApiProviderName ()
 Returns the name of the referenced API provider for the current query. More...
 
static getApiVersion ()
 Returns the version number of the API call. More...
 
- Static Protected Attributes inherited from ezpRestPrefixFilterInterface
static $apiPrefix = null
 
static $apiProvider = null
 
static $version = null
 

Detailed Description

Default implementation of prefix filter interface.

Constructor & Destructor Documentation

ezpRestDefaultRegexpPrefixFilter::__construct ( ezcMvcRequest  $request,
  $apiPrefix 
)

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

Parameters
ezcMvcRequest$request
string$apiPrefix

Member Function Documentation

ezpRestDefaultRegexpPrefixFilter::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.

Returns
void
ezpRestDefaultRegexpPrefixFilter::getPrefixPattern ( )
protected

Referenced by filter().

ezpRestDefaultRegexpPrefixFilter::parseVersionValue ( )
protected

Returns the numerical version of the version token.

Returns
int version value

Referenced by filter().

Member Data Documentation

ezpRestDefaultRegexpPrefixFilter::$apiPart
protected

The documentation for this class was generated from the following file: