Swat/SwatTimeZoneEntry.php
private function parseAreaWhitelist($area_whitelist)
    {
        $areas = array();

        $whitelist = 0;
        foreach ($area_whitelist as $area) {
            $whitelist = $whitelist | $area;
        }

        $tz_data = DateTimeZone::listIdentifiers($whitelist);

        foreach ($tz_data as $id) {
            $area = $this->getArea($id);
            $region = $this->getRegion($id);

            if (!array_key_exists($area, $areas)) {
                $areas[$area] = array();
            }
            $areas[$area][] = $region;
        }

        return $areas;
    }
private function parseAreaWhitelist($area_whitelist)
    {
        $areas = array();

        $whitelist = 0;
        foreach ($area_whitelist as $area) {
            $whitelist = $whitelist | $area;
        }

        $tz_data = DateTimeZone::listIdentifiers($whitelist);

        foreach ($tz_data as $id) {
            $area = $this->getArea($id);
            $region = $this->getRegion($id);

            if (!array_key_exists($area, $areas)) {
                $areas[$area] = array();
            }
            $areas[$area][] = $region;
        }

        return $areas;
    }
private function parseAreaWhitelist ( $ area_whitelist ) { $ areas = array ( ) ; $ whitelist = 0 ; foreach ( $ area_whitelist as $ area ) { $ whitelist = $ whitelist | $ area ; } $ tz_data = DateTimeZone :: listIdentifiers ( $ whitelist ) ; foreach ( $ tz_data as $ id ) { $ area = $ this -> getArea ( $ id ) ; $ region = $ this -> getRegion ( $ id ) ; if ( ! array_key_exists ( $ area , $ areas ) ) { $ areas [ $ area ] = array ( ) ; } $ areas [ $ area ] [ ] = $ region ; } return $ areas ; }
Parses a whitelist of valid areas

Filters the full list of areas down to a select list and returns a
tree-structured array of areas, regions, and subregions.

@param array area_whitelist an array of valid area names.

@return array a tree-structured array of areas regions and subregions
inside the specified whitelist of areas.
Parses a whitelist of valid areas