final public function getFlatPrivilegeSet($node)
    {
        $privs = [
            'abstract' => false,
            'aggregates' => $this->getSupportedPrivilegeSet($node),
        ];

        $fpsTraverse = null;
        $fpsTraverse = function ($privName, $privInfo, $concrete, &$flat) use (&$fpsTraverse) {
            $myPriv = [
                'privilege' => $privName,
                'abstract' => isset($privInfo['abstract']) && $privInfo['abstract'],
                'aggregates' => [],
                'concrete' => isset($privInfo['abstract']) && $privInfo['abstract'] ? $concrete : $privName,
            ];

            if (isset($privInfo['aggregates'])) {
                foreach ($privInfo['aggregates'] as $subPrivName => $subPrivInfo) {
                    $myPriv['aggregates'][] = $subPrivName;
                }
            }

            $flat[$privName] = $myPriv;

            if (isset($privInfo['aggregates'])) {
                foreach ($privInfo['aggregates'] as $subPrivName => $subPrivInfo) {
                    $fpsTraverse($subPrivName, $subPrivInfo, $myPriv['concrete'], $flat);
                }
            }
        };

        $flat = [];
        $fpsTraverse('{DAV:}all', $privs, null, $flat);

        return $flat;
    }
final public function getFlatPrivilegeSet($node)
    {
        $privs = [
            'abstract' => false,
            'aggregates' => $this->getSupportedPrivilegeSet($node),
        ];

        $fpsTraverse = null;
        $fpsTraverse = function ($privName, $privInfo, $concrete, &$flat) use (&$fpsTraverse) {
            $myPriv = [
                'privilege' => $privName,
                'abstract' => isset($privInfo['abstract']) && $privInfo['abstract'],
                'aggregates' => [],
                'concrete' => isset($privInfo['abstract']) && $privInfo['abstract'] ? $concrete : $privName,
            ];

            if (isset($privInfo['aggregates'])) {
                foreach ($privInfo['aggregates'] as $subPrivName => $subPrivInfo) {
                    $myPriv['aggregates'][] = $subPrivName;
                }
            }

            $flat[$privName] = $myPriv;

            if (isset($privInfo['aggregates'])) {
                foreach ($privInfo['aggregates'] as $subPrivName => $subPrivInfo) {
                    $fpsTraverse($subPrivName, $subPrivInfo, $myPriv['concrete'], $flat);
                }
            }
        };

        $flat = [];
        $fpsTraverse('{DAV:}all', $privs, null, $flat);

        return $flat;
    }
final public function getFlatPrivilegeSet ( $ node ) { $ privs = [ 'abstract' => false , 'aggregates' => $ this -> getSupportedPrivilegeSet ( $ node ) , ] ; $ fpsTraverse = null ; $ fpsTraverse = function ( $ privName , $ privInfo , $ concrete , & $ flat ) use ( & $ fpsTraverse ) { $ myPriv = [ 'privilege' => $ privName , 'abstract' => isset ( $ privInfo [ 'abstract' ] ) && $ privInfo [ 'abstract' ] , 'aggregates' => [ ] , 'concrete' => isset ( $ privInfo [ 'abstract' ] ) && $ privInfo [ 'abstract' ] ? $ concrete : $ privName , ] ; if ( isset ( $ privInfo [ 'aggregates' ] ) ) { foreach ( $ privInfo [ 'aggregates' ] as $ subPrivName => $ subPrivInfo ) { $ myPriv [ 'aggregates' ] [ ] = $ subPrivName ; } } $ flat [ $ privName ] = $ myPriv ; if ( isset ( $ privInfo [ 'aggregates' ] ) ) { foreach ( $ privInfo [ 'aggregates' ] as $ subPrivName => $ subPrivInfo ) { $ fpsTraverse ( $ subPrivName , $ subPrivInfo , $ myPriv [ 'concrete' ] , $ flat ) ; } } } ; $ flat = [ ] ; $ fpsTraverse ( '{DAV:}all' , $ privs , null , $ flat ) ; return $ flat ; }
Returns the supported privilege set as a flat list.

This is much easier to parse.

The returned list will be index by privilege name.
The value is a struct containing the following properties:
- aggregates
- abstract
- concrete

@param string|INode $node

@return array
Returns the supported privilege set as a flat list .