Interface TemplateApi
This interface provides the public API for usage
of html template classes in the Oroboros Core.
-
oroboros\core\interfaces\api\TemplateApi
implements
oroboros\OroborosInterface
Methods summary
public
|
#
__construct( array $params = array(), array $flags = array() )
If [$params] is supplied, it will call [queue($params, $flags)]
after construction is complete.
If [$params] is supplied, it will call [queue($params, $flags)]
after construction is complete.
Parameters
- $params
- (optional)
- $flags
- (optional>
Since
0.0.2a
|
public
|
#
initialize( array $params = array(), array $flags = array() )
Must be called before output. If [$params] is supplied,
it will call [queue($params, $flags)] after initialization
is complete.
Must be called before output. If [$params] is supplied,
it will call [queue($params, $flags)] after initialization
is complete.
Parameters
- $params
- (optional)
- $flags
- (optional>
Since
0.0.2a
|
public
|
#
render( array $params = array(), array $flags = array() )
Directs the template to render fully, using the currently set data.
Initialization method must be called before this point. If [$params]
is not empty, will call [queue($params, $flags)] before rendering.
Directs the template to render fully, using the currently set data.
Initialization method must be called before this point. If [$params]
is not empty, will call [queue($params, $flags)] before rendering.
Parameters
- $params
- (optional)
- $flags
- (optional)
Since
0.0.2a
|
public
|
#
reset( array $params = array(), array $flags = array() )
Calls all individual reset methods. Restores template data to default
settings. If [$params] is supplied, it will call [queue($params, $flags)]
after the reset operation is complete.
Calls all individual reset methods. Restores template data to default
settings. If [$params] is supplied, it will call [queue($params, $flags)]
after the reset operation is complete.
Parameters
- $params
- (optional)
- $flags
- (optional)
Since
0.0.2a
|
public
string
|
#
part( string $part, array $params = array(), array $flags = array() )
Returns a rendered template part. If data is needed to fill
out the template, it should be supplied in [$params]. If any
special conditions may change the way that the template part
is laid out, it should be passed in [$flags].
Returns a rendered template part. If data is needed to fill
out the template, it should be supplied in [$params]. If any
special conditions may change the way that the template part
is laid out, it should be passed in [$flags].
Parameters
- $part
- (required) The template part name.
- $params
- (optional)
- $flags
- (optional)
Returns
string The completed template markup
Since
0.0.2a
|
public
|
#
queue( array $params = array(), array $flags = array() )
Calls the setter method for any known data type that the
template handles. When possible, queues additional data
non-destructively. If [$params] is empty or not provided,
has no effect. Queue values should be key => value pairs.
Calls the setter method for any known data type that the
template handles. When possible, queues additional data
non-destructively. If [$params] is empty or not provided,
has no effect. Queue values should be key => value pairs.
Parameters
- $params
- (optional)
- $flags
- (optional)
Since
0.0.2a
|
Constants summary
string |
CLASS_TYPE
|
#
\oroboros\core\interfaces\api\ClassTypeApi::CLASS_TYPE_TEMPLATE
|