_property & $property); } /** * Set the property value. * * @param int $property Property. * @return int */ public function setProperty($property) { $old = $this->_property; $this->_property = $property; return $old; } /** * Add a property. * * @param int $property Property. * @return int */ public function addProperty($property) { $old = $this->_property; $this->_property |= $property; return $old; } /** * Remove a property. * * @param int $property Property. * @return int */ public function removeProperty($property) { $old = $this->_property; $this->_property ^= $property; return $old; } /** * Get the property value. * * @return int */ public function getProperty() { return $this->_property; } /** * Get property name. * * @return string */ public function getPropertyName() { $out = []; if (true === $this->is(static::PURE)) { $out[] = 'pure'; } return implode(', ', $out); } /** * Get property value from a string. * * @param string $property Property name. * @return int */ public static function getPropertyValue($property) { switch ($property) { case 'pure': return static::PURE; } return 0; } }