Stud.IP  5.4
UriTemplate Class Reference

Public Member Functions

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

Data Fields

 $uri_template
 
 $conditions
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

__construct (   $uri_template,
  $conditions = [] 
)

Member Function Documentation

◆ inject()

inject (   $params)

◆ 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

Field Documentation

◆ $conditions

$conditions

◆ $uri_template

$uri_template

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