Set Flags

@param int $flags
@return bool
6671
public function setFlags($flags)
    {
        $flags = Utility::ParseFlags($flags);

        $this->setDup($flags['dup']);
        $this->setQos($flags['qos']);
        $this->setRetain($flags['retain']);
        return true;
    }
439728
public function setFlag(int $flag): void
    {
        if ($flag < 0 || $flag > static::MAX_FLAG) {
            throw new \InvalidArgumentException('Flag must be an unsigned integer on the range [0-255]');
        }

        $this->flag = $flag;
    }
885152
public function setFlag(string $flag, $numbers): bool
    {
        return \imap_setflag_full($this->resource->getStream(), $this->prepareMessageIds($numbers), $flag, \ST_UID);
    }
799452
public function removeFlag($flags)
    {
        $this->bitmask = $this->bitmask & ~$this->getMaskFromFlags($flags);

        return $this;
    }
1219235
public function setDomains($domains)
    {
        if (is_array($domains)) {
            foreach ($domains as $domain) {
                $this->setDomains($domain);
            }
            return $this;
        }

        $this->domains[] = $domains;

        return $this;
    }
1045622
public function distinct($flag = true)
    {
        $this->_parts[self::DISTINCT] = (bool) $flag;
        return $this;
    }
306740
public function hasBeenTransformed($flag = null) {
        if ($flag === null) {
            return $this->hasBeenTransformed;
        }

        $this->hasBeenTransformed = (bool) $flag;

        return $this;
    }
1360281
protected function sanitizeFlags(array $flags)
    {
        $flags = (array) $flags;

        // Flip array if necessary
        $firstKey = Arr::get(array_keys($flags), 0);
        if ($firstKey !== null && is_int($firstKey)) {
            $flags = array_combine(
                array_values($flags),
                array_fill(0, count($flags), null)
            );
        }

        return $flags;
    }
892539
public function setFlags( $value )
	{
		if ( $value == $this->getFlags() ) { return; }

		$this->_checkFlags($value);
		$this->_values['flags'] = (int) $value;
		$this->setModified();
	}
735506
public function remove(...$flags)
    {
        foreach ($flags as $flag) {
            if ($this->has($flag)) {
                $this->flags = $this->flags ^ (int) $flag;
            }
        }

        return $this;
    }
1145266
public function setStale($flag)
    {
        if (!is_bool($flag)) {
            $this->params['stale'] = $flag;
        } elseif ($flag === true) {
            $this->params['stale'] = 'ok';
        } else {
            unset($this->params['stale']);
        }

        return $this;
    }
984560
public function setClosed($flag = true) {
		$this->_closed    = (bool) $flag;
		$this->_tagCached = null;
		
		return $this;
	}
34364
public function flag()
    {
        $args = func_get_args();
        $num = count($args);

        if ($num > 1) {
            $this->flags[$args[0]] = $args[1];

            return $this;
        }

        if (array_key_exists($args[0], $this->flags)) {
            return $this->flags[$args[0]];
        }
    }
1160009
public function setFlag($flag)
    {
        if (!in_array($flag, [DiscloseNode::FLAG_HIDE, DiscloseNode::ALT_FLAG_HIDE, DiscloseNode::FLAG_SHOW, DiscloseNode::ALT_FLAG_SHOW])) {
            throw new UnexpectedValueException(sprintf(
                'The value of the parameter \'flag\' must be set to \'%s\', \'%s\', \'%s\' or \'%s\'.',
                DiscloseNode::FLAG_HIDE,
                DiscloseNode::ALT_FLAG_HIDE,
                DiscloseNode::FLAG_SHOW,
                DiscloseNode::ALT_FLAG_SHOW
            ));
        }

        $this->flag = $flag;

        return $this;
    }
145541
public static function convertToDelegateFlags($flags = null)
    {
        if (null === $flags) {
            return AMQP_NOPARAM;
        }

        $converted = 0;

        foreach (self::$flagMap as $from => $to) {
            if ($flags & $from) {
                $converted |= $to;
            }
        }

        return $converted;
    }
889248
public function setFlag($flag, $enabled = true)
    {
        if ($enabled) {
            $this->flags |= $flag;
        } else {
            $this->flags &= ~$flag;
        }

        return $this;
    }
1280546
public function setFlags($flags)
    {
        if (!is_int($flags)) {
            throw new InvalidArgumentException('integer', 0);
        }

        if (($flags & FORCE_USE_PROC_OPEN) && ($flags & FORCE_USE_EXEC)) {
            throw new DomainException("Invalid flags: FORCE_USE_PROC_OPEN and FORCE_USE_EXEC cannot be set at the same time");
        }

        $this->flags = $flags;

        return $this;
    }