LdapTools\AttributeConverter\ConvertGroupType::modifyGroupTypeValue PHP Метод

modifyGroupTypeValue() защищенный Метод

Given a bool value, do the needed bitwise comparison against the groupType value to either remove or add the bit from the overall value.
protected modifyGroupTypeValue ( boolean $value ) : integer
$value boolean
Результат integer
    protected function modifyGroupTypeValue($value)
    {
        $this->setDefaultLastValue('groupType', $this->getOptions()['defaultValue']);
        $lastValue = is_array($this->getLastValue()) ? reset($this->getLastValue()) : $this->getLastValue();
        // If the bit we are expecting is already set how we want it, then do not attempt to modify it.
        if ($this->fromLdap($lastValue) == $value) {
            return $lastValue;
        }
        if (in_array($this->getAttribute(), $this->getOptions()['types']['type'])) {
            $value = $this->shouldInvertValue() ? !$value : $value;
            $this->setLastValue($this->modifyBitmaskValue($lastValue, $value, $this->getAttribute()));
        } else {
            $this->modifyGroupScopeBit($lastValue, $value);
        }
        return (string) $this->getLastValue();
    }