Stud.IP  trunk Revision
UriTemplate Class Reference
Collaboration diagram for UriTemplate:
Collaboration graph

Public Member Functions

 __construct ($uri_template, $conditions=[])
 
 match ($uri, &$parameters=null)
 
 inject ($params)
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

__construct (   $uri_template,
  $conditions = [] 
)

Member Function Documentation

◆ inject()

inject (   $params)
Here is the call graph for this function:

◆ match()

match (   $uri,
$parameters = null 
)

Tests whether an uri matches a template.

The template may contain placeholders by prefixing an appropriate, unique placeholder name with a colon (:).

$template = '/hello/:name';

If the uri matches the template, all evaluated placeholders will be stored in the parameters array.

Parameters
String$uriThe uri to test
Array$parametersStores evaluated parameters on match (optional)
Returns
bool Returns true if the uri matches the template

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