/** * Set property value, proxied to Bitmap. * * @param string $name Name of class property. * @param mixed $value Boolean or whatever can be interpreted as one. * * @return void * @access public * @magic * @throws Exception */ public function __set($name, $value) { if (!array_key_exists($name, $this->mapped)) { throw new Exception("Property '{$name}' does not exist in bitfield map."); } if ($value) { $this->bitfield->enable(constant($this->mapped[$name])); } else { $this->bitfield->disable(constant($this->mapped[$name])); } }