Class Template
Captures and formats templates (variable content placeholders) by delegating rendering to external handlers.
- Core\Object implements Core\Chainable
- Core\Set implements Core\Accessor
- Core\Formatter\Driver\coreuimarkup\Token
- Core\Formatter\Driver\coreuimarkup\Token\Template
Package: CoreUI\Markup\Token
Since: 3.1
Requires: PHP 5.3
Version: 1.0
Located at Formatter/Driver/coreuimarkup/Token/Template.inc.php
Methods summary
public
|
|
public
string[]
|
|
public
string
|
|
public
string
|
|
public
|
#
registerTemplate( string $template, callable $callback )
Registers a new handler for a template. An existing handler for the given template is replaced with the new one. |
public
|
#
registerTemplates( array $templates )
Registers a set of new template handlers. Any already existing handler for a given template is replaced with the new one. |
public
|
Methods inherited from Core\Object
__autocreateFactory()
,
__call()
,
__processParameters()
,
__toString()
,
attachMethod()
,
chain()
,
getValueForKey()
,
getValueForKeyPath()
,
getValueForUndefinedKey()
,
hash()
,
issetValueForKey()
,
setValueForKey()
,
setValueForKeyPath()
,
setValueForUndefinedKey()
,
uuid()
Constants summary
Constants inherited from Core\Object
AnyParameterType
,
AutochainParameterType
,
AutocreateParameterType
,
BooleanParameterType
,
CharParameterType
,
EnumParameterType
,
IntegerParameterType
,
RealParameterType
,
StringParameterType
,
UserParameterType
Properties summary
protected
callable
|
$_v_defaultHandler
Default handler invoked if no specific handler for a captured template is registered. |
|
protected
array
|
$_v_templates
Dictionary of registered templates as keys and their associated callbacks as values. |
#
array ()
|
Properties inherited from Core\Formatter\Driver\coreuimarkup\Token
Magic properties
public read-only
callable
|
$defaultHandler
Default handler invoked if no specific handler for a captured template is registered. |
public read-only
array
|
$templates
Dictionary of registered templates as keys and their associated callbacks as values. |