lib/Disco.php
protected function filterAddInstitutionList($list)
    {
        foreach ($list as $entityId => $idp) {
            if (in_array($entityId, $this->whitelist)) {
                unset($list[$entityId]);
            }
        }

        if (empty($list)) {
            throw new Exception('All IdPs has been filtered out. And no one left.');
        }

        return $list;
    }
protected function filterAddInstitutionList($list)
    {
        foreach ($list as $entityId => $idp) {
            if (in_array($entityId, $this->whitelist)) {
                unset($list[$entityId]);
            }
        }

        if (empty($list)) {
            throw new Exception('All IdPs has been filtered out. And no one left.');
        }

        return $list;
    }
protected function filterAddInstitutionList ( $ list ) { foreach ( $ list as $ entityId => $ idp ) { if ( in_array ( $ entityId , $ this -> whitelist ) ) { unset ( $ list [ $ entityId ] ) ; } } if ( empty ( $ list ) ) { throw new Exception ( 'All IdPs has been filtered out. And no one left.' ) ; } return $ list ; }
Filter a list of entities for addInstitution app according to if entityID is whitelisted or not

@param array $list A map of entities to filter.
@return array The list in $list after filtering entities.
@throws Exception if all IdPs are filtered out and no one left.
Filter a list of entities for addInstitution app according to if entityID is whitelisted or not