properties[$name] = $value; } public function __get( $name ) { return $this->properties[ $name ]; } public function toString() { $str = ""; foreach ( $properties as $key => $value ) { $str .= "$key => $value\n"; } return $str; } } ?>