// ---------------------------------------------------------------- // Get a property value with a user defined default value // ---------------------------------------------------------------- function Get($name, $default = '') { $value = $this->props[$name]; if (defined($value)) { $value = $default; } return $value; } // ---------------------------------------------------------------- // Sets a property value // ---------------------------------------------------------------- function Set($name, $value) { $this->props[$name] = $value; } // ---------------------------------------------------------------- // Prints the content of the properties // ---------------------------------------------------------------- function DumpContent() { while (list($key, $val) = each($this->props)) { echo "{$key} = {$val}<br>\n"; } } } $properties = new Properties(); $properties->Create();