Source for file Plugin.php

Documentation is available at Plugin.php

  1. <?php
  2.  
  3. /**
  4.  * base plugin class
  5.  *
  6.  * you have to implement the <em>process()</em> method, it will receive the parameters that
  7.  * are in the template code
  8.  *
  9.  * This software is provided 'as-is', without any express or implied warranty.
  10.  * In no event will the authors be held liable for any damages arising from the use of this software.
  11.  *
  12.  * This file is released under the LGPL
  13.  * "GNU Lesser General Public License"
  14.  * More information can be found here:
  15.  * {@link http://www.gnu.org/copyleft/lesser.html}
  16.  *
  17.  * @author     Jordi Boggiano <j.boggiano@seld.be>
  18.  * @copyright  Copyright (c) 2008, Jordi Boggiano
  19.  * @license    http://www.gnu.org/copyleft/lesser.html  GNU Lesser General Public License
  20.  * @link       http://dwoo.org/
  21.  * @version    0.9.1
  22.  * @date       2008-05-30
  23.  * @package    Dwoo
  24.  */
  25. abstract class Dwoo_Plugin
  26. {
  27.     /**
  28.      * the dwoo instance that runs this plugin
  29.      *
  30.      * @var Dwoo 
  31.      */
  32.     protected $dwoo;
  33.  
  34.     /**
  35.      * constructor, if you override it, call parent::__construct($dwoo); or assign
  36.      * the dwoo instance yourself if you need it
  37.      *
  38.      * @param Dwoo $dwoo the dwoo instance that runs this plugin
  39.      */
  40.     public function __construct(Dwoo $dwoo)
  41.     {
  42.         $this->dwoo = $dwoo;
  43.     }
  44.  
  45.     // plugins that have arguments should always implement :
  46.     // public function process($arg, $arg, ...)
  47.     // or for block plugins :
  48.     // public function init($arg, $arg, ...)
  49.  
  50.     // this could be enforced with :
  51.     // public function process(...)
  52.     // if my bug entry gets enough interest one day..
  53.     // see => http://bugs.php.net/bug.php?id=44043
  54. }

Documentation generated on Sat, 28 Jun 2008 01:38:31 +0200 by phpDocumentor 1.4.0