lib/CucumberSteps.php in cuke4php-0.9.2 vs lib/CucumberSteps.php in cuke4php-0.9.3

- old
+ new

@@ -72,8 +72,28 @@ return self::$aMocks[$sClass]; } else { return new $sClass($aGlobals); } } + + public function __set($sName, $sValue) { + $this->aGlobals[$sName] = $sValue; + } + + public function __get($sName) { + if (array_key_exists($sName, $this->aGlobals)) { + return $this->aGlobals[$sName]; + } else { + trigger_error("Property ($sName) not defined", E_USER_ERROR); + } + } + + public function __unset($sName) { + unset($this->aGlobals[$sName]); + } + + public function __isset($sName) { + return isset($this->aGlobals[$sName]); + } } ?> \ No newline at end of file