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.  * This file is released under the LGPL
  15.  * "GNU Lesser General Public License"
  16.  * More information can be found here:
  17.  * {@link http://www.gnu.org/copyleft/lesser.html}
  18.  *
  19.  * @author     Jordi Boggiano <[email protected]>
  20.  * @copyright  Copyright (c) 2008, Jordi Boggiano
  21.  * @license    http://www.gnu.org/copyleft/lesser.html  GNU Lesser General Public License
  22.  * @link       http://dwoo.org/
  23.  * @version    0.9.1
  24.  * @date       2008-05-30
  25.  * @package    Dwoo
  26.  */
  27. interface Dwoo_ICompiler
  28. {
  29.     /**
  30.      * compiles the provided string down to php code
  31.      *
  32.      * @param string $templateStr the template to compile
  33.      * @return string a compiled php code string
  34.      */
  35.     public function compile(Dwoo $dwooDwoo_ITemplate $template);
  36.  
  37.     /**
  38.      * adds the custom plugins loaded into Dwoo to the compiler so it can load them
  39.      *
  40.      * @see Dwoo::addPlugin
  41.      * @param array $customPlugins an array of custom plugins
  42.      */
  43.     public function setCustomPlugins(array $customPlugins);
  44.  
  45.     /**
  46. /**
  47.      * sets the security policy object to enforce some php security settings
  48.      *
  49.      * use this if untrusted persons can modify templates,
  50.      * set it on the Dwoo object as it will be passed onto the compiler automatically
  51.      *
  52.      * @param Dwoo_Security_Policy $policy the security policy object
  53.      */
  54.     public function setSecurityPolicy(Dwoo_Security_Policy $policy null);
  55. }

Documentation generated on Sun, 03 Aug 2008 15:12:38 +0200 by phpDocumentor 1.4.0