Go to the documentation of this file.00001 <?php
00002
00006 class OxConfigFile
00007 {
00018 private function _loadVars($sFileName)
00019 {
00020 include $sFileName;
00021 }
00022
00028 public function __construct($sFileName)
00029 {
00030 $this->_loadVars($sFileName);
00031 }
00032
00040 public function getVar($sVarName)
00041 {
00042 if (isset ($this->$sVarName)) {
00043 return $this->$sVarName;
00044 }
00045
00046 return null;
00047 }
00048
00057 public function setVar($sVarName, $sValue)
00058 {
00059 $this->$sVarName = $sValue;
00060 }
00061
00069 public function isVarSet($sVarName)
00070 {
00071 return isset($this->$sVarName);
00072 }
00073
00079 public function getVars()
00080 {
00081 $aAllVars = get_object_vars($this);
00082
00083 return $aAllVars;
00084 }
00085
00093 public function setFile( $sFileName )
00094 {
00095 if ( is_readable( $sFileName ) ) {
00096 $this->_loadVars( $sFileName );
00097 }
00098 }
00099 }