LdapTools\Security\Ace\Ace::toggleObjectStatus PHP Method

toggleObjectStatus() protected method

protected toggleObjectStatus ( GUID | null $object, integer $type )
$object LdapTools\Security\GUID | null
$type integer
    protected function toggleObjectStatus($object, $type)
    {
        if (!$object && !$this->objectFlags) {
            return $this;
        }
        if ($object && !$this->objectFlags) {
            $this->objectFlags = new AceObjectFlags();
        }
        if ($object) {
            $this->objectFlags->add($type);
        } else {
            $this->objectFlags->remove($type);
        }
        return $this;
    }