Source for file IPluginProxy.php

Documentation is available at IPluginProxy.php

  1. <?php
  2.  
  3. /**
  4.  * interface that represents a dwoo plugin proxy
  5.  *
  6.  * This software is provided 'as-is', without any express or implied warranty.
  7.  * In no event will the authors be held liable for any damages arising from the use of this software.
  8.  *
  9.  * @author     Denis Arh <denis@arh.cc>
  10.  * @author     Jordi Boggiano <j.boggiano@seld.be>
  11.  * @copyright  Copyright (c) 2008, Denis Arh, Jordi Boggiano
  12.  * @license    http://dwoo.org/LICENSE   Modified BSD License
  13.  * @link       http://dwoo.org/
  14.  * @version    1.0.0
  15.  * @date       2008-10-23
  16.  * @package    Dwoo
  17.  */
  18. {
  19.     /**
  20.      * returns true or false to say whether the given plugin is handled by this proxy or not
  21.      *
  22.      * @param string $name the plugin name
  23.      * @return bool true if the plugin is known and usable, otherwise false
  24.      */
  25.     public function handles($name);
  26.  
  27.     /**
  28.      * returns the code (as a string) to call the plugin
  29.      * (this will be executed at runtime inside the Dwoo class)
  30.      *
  31.      * @param string $name the plugin name
  32.      * @param array $params a parameter array, array key "*" is the rest array
  33.      * @return string 
  34.      */
  35.     public function getCode($name$params);
  36.  
  37.     /**
  38.      * returns a callback to the plugin, this is used with the reflection API to
  39.      * find out about the plugin's parameter names etc.
  40.      *
  41.      * should you need a rest array without the possibility to edit the
  42.      * plugin's code, you can provide a callback to some
  43.      * other function with the correct parameter signature, i.e. :
  44.      * <code>
  45.      * return array($this, "callbackHelper");
  46.      * // and callbackHelper would be as such:
  47.      * public function callbackHelper(array $rest=array()){}
  48.      * </code>
  49.      *
  50.      * @param string $name the plugin name
  51.      * @return callback 
  52.      */
  53.     public function getCallback($name);
  54.  
  55.     /**
  56.      * returns some code that will check if the plugin is loaded and if not load it
  57.      * this is optional, if your plugins are autoloaded or whatever, just return an
  58.      * empty string
  59.      *
  60.      * @param string $name the plugin name
  61.      * @return string 
  62.      */
  63.     public function getLoader($name);
  64. }

Documentation generated on Sat, 18 Jul 2009 21:05:10 +0200 by phpDocumentor 1.4.0