Template
in package
Table of Contents
- REGEXP_EXPRESSION_DETECTOR = '/\{[^\}]*\}/x'
- Expression regular expression pattern.
- $expressions : array<string|int, mixed>
- $template : string
- $variableNames : array<string|int, mixed>
- __set_state() : self
- {@inheritDoc}
- createFromString() : self
- expand() : string
- toString() : string
- variableNames() : array<string|int, string>
- __construct() : mixed
Constants
REGEXP_EXPRESSION_DETECTOR
Expression regular expression pattern.
private
mixed
REGEXP_EXPRESSION_DETECTOR
= '/\{[^\}]*\}/x'
Properties
$expressions
private
array<string|int, mixed>
$expressions
= []
$template
private
string
$template
$variableNames
private
array<string|int, mixed>
$variableNames
Methods
__set_state()
{@inheritDoc}
public
static __set_state(array<string|int, mixed> $properties) : self
Parameters
- $properties : array<string|int, mixed>
Return values
self —createFromString()
public
static createFromString(object|string $template) : self
Parameters
- $template : object|string
-
a string or an object with the __toString method
Tags
Return values
self —expand()
public
expand(VariableBag $variables) : string
Parameters
- $variables : VariableBag
Tags
Return values
string —toString()
public
toString() : string
Return values
string —variableNames()
public
variableNames() : array<string|int, string>
Return values
array<string|int, string> —__construct()
private
__construct(string $template, Expression ...$expressions) : mixed
Parameters
- $template : string
- $expressions : Expression