Source for file ICompiler.php

Documentation is available at ICompiler.php

  1. <?php
  2.  
  3. /**
  4.  * interface that represents a dwoo compiler
  5.  *
  6.  * while implementing this is enough to interact with Dwoo/Dwoo_Templates, it is not
  7.  * sufficient to interact with Dwoo_Plugins, however the main purpose of creating a
  8.  * new compiler would be to interact with other/different plugins, that is why this
  9.  * interface has been left with the minimum requirements.
  10.  *
  11.  * This software is provided 'as-is', without any express or implied warranty.
  12.  * In no event will the authors be held liable for any damages arising from the use of this software.
  13.  *
  14.  * @author     Jordi Boggiano <j.boggiano@seld.be>
  15.  * @copyright  Copyright (c) 2008, Jordi Boggiano
  16.  * @license    http://dwoo.org/LICENSE   Modified BSD License
  17.  * @link       http://dwoo.org/
  18.  * @version    1.0.0
  19.  * @date       2008-10-23
  20.  * @package    Dwoo
  21.  */
  22. interface Dwoo_ICompiler
  23. {
  24.     /**
  25.      * compiles the provided string down to php code
  26.      *
  27.      * @param string $templateStr the template to compile
  28.      * @return string a compiled php code string
  29.      */
  30.     public function compile(Dwoo $dwooDwoo_ITemplate $template);
  31.  
  32.     /**
  33.      * adds the custom plugins loaded into Dwoo to the compiler so it can load them
  34.      *
  35.      * @see Dwoo::addPlugin
  36.      * @param array $customPlugins an array of custom plugins
  37.      */
  38.     public function setCustomPlugins(array $customPlugins);
  39.  
  40.     /**
  41. /**
  42.      * sets the security policy object to enforce some php security settings
  43.      *
  44.      * use this if untrusted persons can modify templates,
  45.      * set it on the Dwoo object as it will be passed onto the compiler automatically
  46.      *
  47.      * @param Dwoo_Security_Policy $policy the security policy object
  48.      */
  49.     public function setSecurityPolicy(Dwoo_Security_Policy $policy null);
  50. }

Documentation generated on Sun, 07 Feb 2010 17:53:48 +0000 by phpDocumentor 1.4.0