Orion PHP  0.11.12
The PHP5.3 framework
Orion\Core\Controller\Template Class Reference
+ Inheritance diagram for Orion\Core\Controller\Template:

List of all members.

Public Member Functions

 load ()
 getTemplate ()
 setTemplate ($name)

Protected Member Functions

 assign ($block, $content, $nocache=false)
 clearCache ($view, $id=null)
 includeCSS ($file)
 render ($template, $id=null, $compile_id=null)
 renderView ($view, $id=null, $compile_id=null)
 isCached ($view, $cache_id=null, $template_id=null)
 setRenderer ($renderer)

Protected Attributes

 $renderer = Core\Renderer::DEFAULT_RENDERER
 $tpl = null
 $template = null

Detailed Description

Definition at line 17 of file template.php.


Member Function Documentation

Orion\Core\Controller\Template::assign ( block,
content,
nocache = false 
) [protected]

assigns a Smarty variable.

Parameters:
array | string$blockthe template variable name(s)
mixed$valuethe value to assign
boolean$nocacheif true any output of this variable will be not cached

Definition at line 78 of file template.php.

Orion\Core\Controller\Template::clearCache ( view,
id = null 
) [protected]

Clears cache of given view

Parameters:
string$view
string$id

Definition at line 90 of file template.php.

Orion\Core\Controller\Template::getTemplate ( )

Get current template name

Returns:
string

Definition at line 190 of file template.php.

Orion\Core\Controller\Template::includeCSS ( file) [protected]

Shortcuts the includeCSS method of the renderer, using a relative file path.

Parameters:
string$fileThe CSS file path, relative to the module directory

Definition at line 112 of file template.php.

Orion\Core\Controller\Template::isCached ( view,
cache_id = null,
template_id = null 
) [protected]

Tests if given view is cached

Parameters:
string$view
string$cache_id
string$template_id
Returns:
boolean

Definition at line 165 of file template.php.

Orion\Core\Controller\Template::load ( )

Main module function, executed right after module loading by Orion. Handles route parsing and function callbacks.

Reimplemented from Orion\Core\Controller.

Definition at line 44 of file template.php.

Orion\Core\Controller\Template::render ( template,
id = null,
compile_id = null 
) [protected]

Displays template (shortlink for $this->tpl->display(...)).

Deprecated:
Use displayView() and local views instead
Parameters:
string$templatethe resource handle of the template file or template object
mixed$idcache id to be used with this template

Definition at line 124 of file template.php.

Orion\Core\Controller\Template::renderView ( view,
id = null,
compile_id = null 
) [protected]

Displays view (shortlink for $this->tpl->display('file:'.$local_view_file)).

Parameters:
string$viewThe name of the view file to display, without any extension or path. For example, to load local index.view.tpl, use $this->displayView('index').
mixed$cache_idcache id to be used with this template
mixed$compile_idcompile id to be used with this template
object$parentnext higher level of Smarty variables

Definition at line 137 of file template.php.

Orion\Core\Controller\Template::setRenderer ( renderer) [protected]

Override current renderer and reset template variable

Parameters:
string$renderer

Definition at line 199 of file template.php.

Orion\Core\Controller\Template::setTemplate ( name)

Set a new template theme.

Parameters:
string$name

Definition at line 212 of file template.php.


Member Data Documentation

Orion::Core::Controller\Template::$renderer = Core\Renderer::DEFAULT_RENDERER [protected]

Definition at line 25 of file template.php.

Orion::Core::Controller\Template::$template = null [protected]

Definition at line 38 of file template.php.

Orion::Core::Controller\Template::$tpl = null [protected]

Definition at line 31 of file template.php.


The documentation for this class was generated from the following file: