Support Joomla!

Joomla! 1.5 Documentation

Packages

Package: patTemplate

Developer Network License

The Joomla! Developer Network content is © copyright 2006 by the individual contributors and can be used in accordance with the Creative Commons License, Attribution- NonCommercial- ShareAlike 2.5
Source code for file /pattemplate/patTemplate/Module.php

Documentation is available at Module.php

  1. <?PHP
  2. /**
  3.  * patTemplate Module base class
  4.  *
  5.  * $Id: Module.php 219 2004-05-25 20:38:38Z schst $
  6.  *
  7.  * The patTemplate_Module is the base class for all patTemplate
  8.  * modules like readers, dumpers, filters, etc.
  9.  *
  10.  * @package        patTemplate
  11.  * @author        Stephan Schmidt <[email protected]>
  12.  */
  13.  
  14. /**
  15.  * patTemplate Module base class
  16.  *
  17.  * $Id: Module.php 219 2004-05-25 20:38:38Z schst $
  18.  *
  19.  * The patTemplate_Module is the base class for all patTemplate
  20.  * modules like readers, dumpers, filters, etc.
  21.  *
  22.  * @abstract
  23.  * @package        patTemplate
  24.  * @author        Stephan Schmidt <[email protected]>
  25.  * @abstract
  26.  */
  27. {
  28.    /**
  29.     * module name
  30.     *
  31.     * This has to be set in the final
  32.     * module classes.
  33.     *
  34.     * @access    protected
  35.     * @var        string 
  36.     */
  37.     var    $_name = null;
  38.  
  39.    /**
  40.     * module parameters
  41.     *
  42.     * @access    protected
  43.     * @var        array 
  44.     */
  45.     var    $_params = array();
  46.  
  47.    /**
  48.     * get the name of the module
  49.     *
  50.     * @access    public
  51.     * @return    string    name of the module
  52.     */
  53.     function getName()
  54.     {
  55.         return $this->_name;
  56.     }
  57.  
  58.    /**
  59.     * sets parameters of the module
  60.     *
  61.     * @access    public
  62.     * @param    array    assoc array containing parameters
  63.     * @param    boolean    flag to indicate, whether previously set parameters should be cleared
  64.     */
  65.     function setParams$params$clear false )
  66.     {
  67.         if$clear === true )
  68.             $this->_params = array();
  69.         $this->_params = array_merge$this->_params$params );
  70.     }
  71.  
  72.    /**
  73.     * gets a parameter of the module
  74.     *
  75.     * @access    public
  76.     * @param    string    name of the parameter
  77.     * @return    mixed    value of the parameter
  78.     */
  79.     function getParam$name )
  80.     {
  81.         ifisset$this->_params[$name) )
  82.             return $this->_params[$name];
  83.         return false;
  84.     }
  85. }
  86. ?>

Documentation generated on Mon, 05 Mar 2007 21:11:02 +0000 by phpDocumentor 1.3.1