src/LdapTools/AttributeConverter/ConvertFlags.php
protected function modifyFlagValue($value)
    {
        $this->setDefaultLastValue($this->getEnumAttribute(), $this->getDefaultEnumValue());
        $flags = $this->getFlagFromLastValue($this->getLastValue());

        $value = $this->options['invert'] ? !$value : $value;
        if ($value) {
            $flags->add($this->flagName);
        } else {
            $flags->remove($this->flagName);
        }

        return $flags->getValue();
    }
protected function modifyFlagValue($value)
    {
        $this->setDefaultLastValue($this->getEnumAttribute(), $this->getDefaultEnumValue());
        $flags = $this->getFlagFromLastValue($this->getLastValue());

        $value = $this->options['invert'] ? !$value : $value;
        if ($value) {
            $flags->add($this->flagName);
        } else {
            $flags->remove($this->flagName);
        }

        return $flags->getValue();
    }
protected function modifyFlagValue ( $ value ) { $ this -> setDefaultLastValue ( $ this -> getEnumAttribute ( ) , $ this -> getDefaultEnumValue ( ) ) ; $ flags = $ this -> getFlagFromLastValue ( $ this -> getLastValue ( ) ) ; $ value = $ this -> options [ 'invert' ] ? ! $ value : $ value ; if ( $ value ) { $ flags -> add ( $ this -> flagName ) ; } else { $ flags -> remove ( $ this -> flagName ) ; } return $ flags -> getValue ( ) ; }
Given a bool value, do the needed bitwise comparison against the flag value to either remove or add the bit from
the overall value.

@param bool $value
@return int
Given a bool value do the needed bitwise comparison against the flag value to either remove or add the bit from the overall value .