src/Pyrite/ACL.php
private static function _load($flat)
    {
        if (is_array($flat) && !is_array($_SESSION['ACL_INFO']) && count($flat) > 0) {
            $_SESSION['ACL_INFO'] = array();
        };
        foreach ($flat as $row) {
            if (!array_key_exists($row['action'], $_SESSION['ACL_INFO'])) {
                $_SESSION['ACL_INFO'][$row['action']] = Array();
            }
            if (!array_key_exists($row['objectType'], $_SESSION['ACL_INFO'][$row['action']])) {
                $_SESSION['ACL_INFO'][$row['action']][$row['objectType']] = Array();
            };
            if (!in_array($row['objectId'], $_SESSION['ACL_INFO'][$row['action']][$row['objectType']])) {
                $_SESSION['ACL_INFO'][$row['action']][$row['objectType']][] = $row['objectId'];
            };
        };
    }
private static function _load($flat)
    {
        if (is_array($flat) && !is_array($_SESSION['ACL_INFO']) && count($flat) > 0) {
            $_SESSION['ACL_INFO'] = array();
        };
        foreach ($flat as $row) {
            if (!array_key_exists($row['action'], $_SESSION['ACL_INFO'])) {
                $_SESSION['ACL_INFO'][$row['action']] = Array();
            }
            if (!array_key_exists($row['objectType'], $_SESSION['ACL_INFO'][$row['action']])) {
                $_SESSION['ACL_INFO'][$row['action']][$row['objectType']] = Array();
            };
            if (!in_array($row['objectId'], $_SESSION['ACL_INFO'][$row['action']][$row['objectType']])) {
                $_SESSION['ACL_INFO'][$row['action']][$row['objectType']][] = $row['objectId'];
            };
        };
    }
private static function _load ( $ flat ) { if ( is_array ( $ flat ) && ! is_array ( $ _SESSION [ 'ACL_INFO' ] ) && count ( $ flat ) > 0 ) { $ _SESSION [ 'ACL_INFO' ] = array ( ) ; } ; foreach ( $ flat as $ row ) { if ( ! array_key_exists ( $ row [ 'action' ] , $ _SESSION [ 'ACL_INFO' ] ) ) { $ _SESSION [ 'ACL_INFO' ] [ $ row [ 'action' ] ] = Array ( ) ; } if ( ! array_key_exists ( $ row [ 'objectType' ] , $ _SESSION [ 'ACL_INFO' ] [ $ row [ 'action' ] ] ) ) { $ _SESSION [ 'ACL_INFO' ] [ $ row [ 'action' ] ] [ $ row [ 'objectType' ] ] = Array ( ) ; } ; if ( ! in_array ( $ row [ 'objectId' ] , $ _SESSION [ 'ACL_INFO' ] [ $ row [ 'action' ] ] [ $ row [ 'objectType' ] ] ) ) { $ _SESSION [ 'ACL_INFO' ] [ $ row [ 'action' ] ] [ $ row [ 'objectType' ] ] [ ] = $ row [ 'objectId' ] ; } ; } ; }
Load a block of ACL rules to in-memory tree

A right is described as the triplet: action, objectType, objectId.

@param array $flat List of associative arrays describing rights

@return null
Load a block of ACL rules to in - memory tree