Orion PHP  0.11.12
The PHP5.3 framework
base.php
Go to the documentation of this file.
00001 <?php
00002 
00003 namespace Orion\Core\Renderer;
00004 
00005 
00006 /**
00007  * \Orion\Core\Renderer\Base
00008  * 
00009  * Orion Renderer base interface.
00010  * 
00011  * If your template engine does not support one of those methods, you still have to define them. 
00012  * Just put the default return value inside them for compatibility.
00013  *
00014  * @author Thibaut Despoulain
00015  * @license BSD 4-clauses
00016  * @version 0.11.12
00017  */
00018 interface Base
00019 {
00020     public function __construct();
00021     
00022     /**
00023      * assigns a template variable.
00024      *
00025      * @param array|string $block the template variable name(s)
00026      * @param mixed $value the value to assign
00027      * @param boolean $nocache if true any output of this variable will be not cached
00028      */
00029     public function assign($key, $value, $nocache);
00030     /**
00031      * Clears a template cache file
00032      * @param String $file Template path
00033      * @param String $cache_id The caching identifier (if supported by renderer)
00034      * @param String $compile_id The compile identifier (if supported by renderer)
00035      */
00036     public function clearCache($template, $cache_id);
00037     /**
00038      * Checks if a template file is cached
00039      * @param String $file Template path
00040      * @param String $cache_id The caching identifier (if supported by renderer)
00041      * @param String $compile_id The compile identifier (if supported by renderer)
00042      * @return Boolean Default=FALSE
00043      */
00044     public function isCached($template, $cache_id, $compile_id);
00045     /**
00046      * Render a single template file
00047      * @param String $file Template path
00048      * @param String $cache_id The caching identifier (if supported by renderer)
00049      * @param String $compile_id The compile identifier (if supported by renderer)
00050      */
00051     public function render($file, $cache_id, $compile_id);
00052     /**
00053      * Render a view file, extending a master template
00054      * @param String $file View template path
00055      * @param String $master Master template path (if supported by renderer)
00056      * @param String $cache_id The caching identifier (if supported by renderer)
00057      * @param String $compile_id The compile identifier (if supported by renderer)
00058      */
00059     public function renderView($file, $master, $cache_id, $compile_id);
00060     
00061     /**
00062      * Adds raw javascript script to template
00063      * @param String $rawjs
00064      */
00065     public function addJS($rawjs);
00066     /**
00067      * Includes a javascript file
00068      * @param String $jsfile Javascript file path
00069      */
00070     public function includeJS($jsfile);
00071     /**
00072      * Includes a CSS file
00073      * @param String $cssfile CSS file path
00074      */
00075     public function includeCSS($cssfile);
00076 }
00077 
00078 ?>