Show
Ignore:
Timestamp:
01/10/06 11:23:13 (3 years ago)
Author:
argh
Message:

Added some docs; Added the setPretty method so that a module always has a reference to the main patXMLPretty object; Added the getName method.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/patXMLPretty/Module.php

    r23 r39  
    2727{ 
    2828   /** 
     29    * Stores a reference to the patXMLPretty object 
     30    * this module has been created by. 
     31    * 
     32    * @access   private 
     33    * @var      patXMLPretty 
     34    * @see      setPretty() 
     35    */ 
     36    var $pretty = null; 
     37 
     38   /** 
    2939    * Stores all available options and their values/default values. 
    3040    * 
     41    * @abstract 
    3142    * @access   private 
    3243    * @var      array 
     
    3647    */ 
    3748    var $options = array(); 
     49 
     50   /** 
     51    * Stores the name of the module 
     52    * 
     53    * @abstract 
     54    * @access   private 
     55    * @var      string 
     56    * @see      getName() 
     57    */ 
     58    var $name = null; 
     59 
     60   /** 
     61    * Sets the patXMLPretty object this module has 
     62    * been created by. 
     63    * 
     64    * @access   public 
     65    * @param    patXMLPretty 
     66    * @see      $pretty 
     67    */ 
     68    function setPretty( &$pretty ) 
     69    { 
     70        $this->pretty =& $pretty; 
     71    } 
    3872 
    3973   /** 
     
    66100    } 
    67101 
     102   /** 
     103    * Retrieves the current value of the specified option. 
     104    * 
     105    * @access   public 
     106    * @param    string 
     107    * @return   mixed|patError 
     108    * @see      setOption() 
     109    * @see      $options 
     110    */ 
    68111    function getOption( $optionName ) 
    69112    { 
     
    81124        return $this->options[$optionName]; 
    82125    } 
     126 
     127   /** 
     128    * Retrieves the name of the current module. 
     129    * 
     130    * @access   public 
     131    * @return   string 
     132    * @see      $name 
     133    */ 
     134    function getName() 
     135    { 
     136        return $this->name; 
     137    } 
    83138} 
    84139