public function __set($prop, $value) { // Does this property exist? if (array_key_exists($prop, $this->properties)) { $this->properties[$prop] = $value; } else { throw ExceptionFactory::createSetUnexpectedProperty(__FILE__, __LINE__, $this, $prop); } }