LdapTools\Security\Flags::hasOrSet PHP Method

hasOrSet() protected method

protected hasOrSet ( integer $flag, boolean $action )
$flag integer
$action boolean
    protected function hasOrSet($flag, $action)
    {
        if (is_null($action)) {
            $result = $this->has($flag);
        } else {
            $result = (bool) $action === true ? $this->add($flag) : $this->remove($flag);
        }
        return $result;
    }