$value) { $this->set($property, $value); } } /** * Gets any arbitrary property. * * @param string $property * The property to retrieve. * * @return mixed * The value for that property, or NULL if the property does not exist. */ public function get($property) { if (property_exists($this, $property)) { $value = isset($this->{$property}) ? $this->{$property} : NULL; } else { $value = isset($this->additional[$property]) ? $this->additional[$property] : NULL; } return $value; } /** * Sets a value to an arbitrary property. * * @param string $property * The property to use for the value. * @param mixed $value * The value to set. * * @return $this */ public function set($property, $value) { if (property_exists($this, $property)) { $this->{$property} = $value; } else { $this->additional[$property] = $value; } return $this; } }