Stud.IP  5.4
UriTemplate Class Reference

Public Member Functions

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

Data Fields


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.

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

Field Documentation

◆ $conditions


◆ $uri_template


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