public function __get($name) { switch ($name) { case 'has_flags': return (bool) ($this->flags & ~self::FLAG_AVAILABLE); } }