\Google_Utils_UriTemplate

Implementation of levels 1-3 of the URI Template spec.

Summary

Methods
Properties
Constants
parse()
combine()
No public properties found
TYPE_MAP
TYPE_LIST
TYPE_SCALAR
No protected methods found
No protected properties found
N/A
resolveNextSection()
replace()
replaceVars()
getDataType()
combineList()
getValue()
$operators
$reserved
$reservedEncoded
N/A

Constants

TYPE_MAP

TYPE_MAP

TYPE_LIST

TYPE_LIST

TYPE_SCALAR

TYPE_SCALAR

Properties

$operators

$operators : 

Type

— array These are valid at the start of a template block to modify the way in which the variables inside are processed.

$reserved

$reserved : \reserved

Type

\reserved — array These are the characters which should not be URL encoded in reserved strings.

$reservedEncoded

$reservedEncoded : 

Type

Methods

parse()

parse(  $string, array  $parameters) 

Parameters

$string
array $parameters

combine()

combine(  $key,   $parameters,   $sep,   $combine,   $reserved,   $tag_empty,   $combine_on_empty) 

Parameters

$key
$parameters
$sep
$combine
$reserved
$tag_empty
$combine_on_empty

resolveNextSection()

resolveNextSection(  $string,   $parameters) 

This function finds the first matching {.

..} block and executes the replacement. It then calls itself to find subsequent blocks, if any.

Parameters

$string
$parameters

replace()

replace(  $string,   $start,   $end,   $parameters) 

Parameters

$string
$start
$end
$parameters

replaceVars()

replaceVars(  $section,   $parameters,   $sep = ",",   $combine = null,   $reserved = false,   $tag_empty = false,   $combine_on_empty = true) 

Parameters

$section
$parameters
$sep
$combine
$reserved
$tag_empty
$combine_on_empty

getDataType()

getDataType(  $data) 

Return the type of a passed in value

Parameters

$data

combineList()

combineList(  $vars,   $sep,   $parameters,   $combine,   $reserved,   $tag_empty,   $combine_on_empty) 

Utility function that merges multiple combine calls for multi-key templates.

Parameters

$vars
$sep
$parameters
$combine
$reserved
$tag_empty
$combine_on_empty

getValue()

getValue(  $value,   $length) 

Utility function to encode and trim values

Parameters

$value
$length