$value) { if (in_array($key, $this->properties)) { $this->_data[$key] = $value; } } } public function __set($name, $value) { if (!in_array($name, $this->properties)) { return false; } $this->_data[$name] = $value; } public function __get($name) { if (!in_array($name, $this->properties)) { return false; } return isset($this->_data[$name]) ? $this->_data[$name] : null; } }