Add a flag to the value.

@param int[]|string[]|FlagEnumTrait[] ...$flags
@return $this
494523
public function add(...$flags)
    {
        foreach ($flags as $flag) {
            if ($this->has($flag)) {
                continue;
            }
            foreach ($this->getValuesFromFlagOrEnum($flag) as $value) {
                $this->value = $this->value | (int) $value;
            }
        }

        return $this;
    }
723430
public function forUpdate($flag = true)
    {
        $this->_parts[self::FOR_UPDATE] = (bool) $flag;
        return $this;
    }
799452
public function removeFlag($flags)
    {
        $this->bitmask = $this->bitmask & ~$this->getMaskFromFlags($flags);

        return $this;
    }
916643
def _set_flags(self, **flags):
        '''
        
        '''
        self._flags = enum.IntEnum('_flags', flags)
        self.__dict__.update(self._flags.__members__)
        self._patch_flag_doc()
520012
public Message setFlag(Flag ... flags) {
        if(flags != null) {
            short tmp=this.flags;
            for(Flag flag : flags) {
                if(flag != null)
                    tmp|=flag.value();
            }
            this.flags=tmp;
        }
        return this;
    }
6671
public function setFlags($flags)
    {
        $flags = Utility::ParseFlags($flags);

        $this->setDup($flags['dup']);
        $this->setQos($flags['qos']);
        $this->setRetain($flags['retain']);
        return true;
    }
496050
public function ksort($flags = SORT_REGULAR)
    {
        $this->_modified = true;
        return ksort($this->_storage, $flags);
    }
528761
public function removeFlag($flag)
    {
        
        $currentFlags = $this->getFlags();
        for ($i = 0; $i < count($currentFlags); $i++){
            if ($currentFlags[$i] == $flag){
                break;
            }
        }
        
        if ($i <= count($currentFlags)){
            // The flag is found.
            unset($currentFlags[$i]);
            $this->setFlags($currentFlags);
        }
        
    }
728813
public function setFlag(array $mailsIds, $flag) {
		return imap_setflag_full($this->getImapStream(), implode(',', $mailsIds), $flag, ST_UID);
	}
93295
public void setFlags(String flags) {

        try {
            m_flags = Integer.parseInt(flags);
        } catch (Throwable e) {
            setThrowable(e);
        }
    }
127091
public function debug($flag)
    {
        $this->debug = (in_array($flag, [true, false])) ? $flag : false;

        return $this;
    }
1302484
public function addTags(array $tags)
    {
        $this->tagsChanges['added'] = array_unique(
            array_merge($this->tagsChanges['added'], $tags)
        );

        return $this;
    }
1149197
public function setFlags($flags) {
        if($flags !== $flags & (AMQP_DURABLE | AMQP_PASSIVE | AMQP_EXCLUSIVE | AMQP_AUTODELETE))
            return false;

        $this->flags = $flags;
        return true;
    }
889745
public function option(array $values, $flag = self::OPTIONS_MERGE)
    {
        if ($values == null) {
            throw new Exception\InvalidArgumentException('option() expects an array of values');
        }

        if ($flag == self::OPTIONS_SET) {
            $this->option = [];
        }

        foreach ($values as $k => $v) {
            if (!is_string($k)) {
                throw new Exception\InvalidArgumentException('option() expects a string for the value key');
            }
            $this->option[$k] = $v;
        }

        return $this;
    }
89409
public function updateStatusFlags(&$flags)
    {
        // If there is no current FluentState, then we shouldn't update.
        if (!FluentState::singleton()->getLocale()) {
            return;
        }

        // If this page does not exist it should be "invisible"
        if (!$this->isDraftedInLocale() && !$this->isPublishedInLocale()) {
            $flags['fluentinvisible'] = [
                'text' => '',
                'title' => '',
            ];
        }
    }
77216
function addFlag($name, $options = array(), $callback = null)
    {
        $flag = new Flag($name, $options, $callback);

        foreach ($flag->aliases as $alias) {
            $this->flags[$alias] = $flag;
        }

        return $this;
    }
980705
private function parseFlag($flags, $flag) {
        $flag = strtolower($flag);

        if (property_exists($flags[0], strtoupper($flag))) {
            $this->flags->put($flag, $flags[0]->{strtoupper($flag)});
        } elseif (property_exists($flags[0], ucfirst($flag))) {
            $this->flags->put($flag, $flags[0]->{ucfirst($flag)});
        } elseif (property_exists($flags[0], $flag)) {
            $this->flags->put($flag, $flags[0]->$flag);
        }
    }