src/LdapTools/Security/Acl/Dacl.php
protected function orderAcesCanonically()
    {
        $explicitDeny = [];
        $explicitAllow = [];
        $objectDeny = [];
        $objectAllow = [];
        $inherited = [];

        foreach ($this->aces as $ace) {
            $isDenied = $ace->isDenyAce();
            $isObject = $ace->isObjectAce();

            if ($ace->getFlags()->isInherited()) {
                $inherited[] = $ace;
            } elseif ($isDenied && $isObject) {
                $objectDeny[] = $ace;
            } elseif ($isDenied) {
                $explicitDeny[] = $ace;
            } elseif ($isObject) {
                $objectAllow[] = $ace;
            } else {
                $explicitAllow[] = $ace;
            }
        }

        return array_merge(
            $objectDeny,
            $explicitDeny,
            $objectAllow,
            $explicitAllow,
            $inherited
        );
    }
protected function orderAcesCanonically()
    {
        $explicitDeny = [];
        $explicitAllow = [];
        $objectDeny = [];
        $objectAllow = [];
        $inherited = [];

        foreach ($this->aces as $ace) {
            $isDenied = $ace->isDenyAce();
            $isObject = $ace->isObjectAce();

            if ($ace->getFlags()->isInherited()) {
                $inherited[] = $ace;
            } elseif ($isDenied && $isObject) {
                $objectDeny[] = $ace;
            } elseif ($isDenied) {
                $explicitDeny[] = $ace;
            } elseif ($isObject) {
                $objectAllow[] = $ace;
            } else {
                $explicitAllow[] = $ace;
            }
        }

        return array_merge(
            $objectDeny,
            $explicitDeny,
            $objectAllow,
            $explicitAllow,
            $inherited
        );
    }
protected function orderAcesCanonically ( ) { $ explicitDeny = [ ] ; $ explicitAllow = [ ] ; $ objectDeny = [ ] ; $ objectAllow = [ ] ; $ inherited = [ ] ; foreach ( $ this -> aces as $ ace ) { $ isDenied = $ ace -> isDenyAce ( ) ; $ isObject = $ ace -> isObjectAce ( ) ; if ( $ ace -> getFlags ( ) -> isInherited ( ) ) { $ inherited [ ] = $ ace ; } elseif ( $ isDenied && $ isObject ) { $ objectDeny [ ] = $ ace ; } elseif ( $ isDenied ) { $ explicitDeny [ ] = $ ace ; } elseif ( $ isObject ) { $ objectAllow [ ] = $ ace ; } else { $ explicitAllow [ ] = $ ace ; } } return array_merge ( $ objectDeny , $ explicitDeny , $ objectAllow , $ explicitAllow , $ inherited ) ; }
Returns all ACEs in canonical order as expected by AD.

@return Ace[]
Returns all ACEs in canonical order as expected by AD .