Changeset 99

Show
Ignore:
Timestamp:
03/29/07 23:02:34 (1 year ago)
Author:
mikey
Message:

added methods hasConfigValue($name) and getConfigValues()

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/XJConf/XmlParser.php

    r96 r99  
    181181 
    182182    } 
     183     
     184    /** 
     185     * checks whether a config value exists or not 
     186     * 
     187     * @return  bool 
     188     */ 
     189    public function hasConfigValue($name) 
     190    { 
     191        return isset($this->config[$name]); 
     192    } 
    183193 
    184194    /** 
     
    190200    public function getConfigValue($name) 
    191201    { 
    192         return $this->config[$name]; 
     202        if ($this->hasConfigValue($name) == true) { 
     203            return $this->config[$name]; 
     204        } 
     205         
     206        return null; 
     207    } 
     208     
     209    /** 
     210     * returns all config values as array 
     211     * 
     212     * @return  array 
     213     */ 
     214    public function getConfigValues() 
     215    { 
     216        return $this->config; 
    193217    } 
    194218