public
|
#
registerFilter( callback $callback )
Registers callback as template compile-time filter.
Registers callback as template compile-time filter.
Parameters
|
final public
array
|
#
getFilters( )
Returns all registered compile-time filters.
Returns all registered compile-time filters.
Returns
array
|
public
|
#
render( )
Renders template to output.
Renders template to output.
Implementation of
|
public
string
|
#
__toString( )
Renders template to string.
Renders template to string.
Returns
string
|
protected
string
|
#
compile( string $content, string $label = NULL )
Applies filters on template content.
Applies filters on template content.
Parameters
- $content
string
- $label
string
Returns
string
|
public
|
#
registerHelper( string $name, callback $callback )
Registers callback as template run-time helper.
Registers callback as template run-time helper.
Parameters
- $name
string
- $callback
callback
|
public
|
#
registerHelperLoader( callback $callback )
Registers callback as template run-time helpers loader.
Registers callback as template run-time helpers loader.
Parameters
|
final public
array
|
#
getHelpers( )
Returns all registered run-time helpers.
Returns all registered run-time helpers.
Returns
array
|
public
mixed
|
#
__call( string $name, array $args )
Call a template run-time helper. Do not call directly.
Call a template run-time helper. Do not call directly.
Parameters
- $name
string helper name
- $args
array arguments
Returns
mixed
Throws
|
public
NBaseTemplate
|
|
public
|
#
add( string $name, mixed $value )
Adds new template parameter.
Adds new template parameter.
Parameters
- $name
string name
- $value
mixed value
|
public
NBaseTemplate
|
#
setParams( array $params )
Sets all parameters.
Parameters
Returns
|
public
array
|
#
getParams( )
Returns array of all parameters.
Returns array of all parameters.
Returns
array
|
public
|
#
__set( string $name, mixed $value )
Sets a template parameter. Do not call directly.
Sets a template parameter. Do not call directly.
Parameters
- $name
string name
- $value
mixed value
Throws
|
public
mixed
&
|
#
__get( string $name )
Returns a template parameter. Do not call directly.
Returns a template parameter. Do not call directly.
Parameters
Returns
mixed value
Throws
|
public
boolean
|
#
__isset( string $name )
Determines whether parameter is defined. Do not call directly.
Determines whether parameter is defined. Do not call directly.
Parameters
Returns
boolean
|
public
|
#
__unset( string $name )
Removes a template parameter. Do not call directly.
Removes a template parameter. Do not call directly.
Parameters
Throws
|
public static
string
|
#
optimizePhp( string $source )
Removes unnecessary blocks of PHP code.
Removes unnecessary blocks of PHP code.
Parameters
Returns
string
|