public function getSites()
    {
        $sites = [];
        $defaultSet = false;
        if (!$this->getValid()) {
            return $sites;
        }
        foreach ($this->xml->children() as $child) {
            if ($child->getName() == "site") {
                $site = $this->parseSite($child);
                if ($site !== false) {
                    if ($defaultSet && $site['default']) {
                        $this->logger->error('There can be only one default site.');
                    } else {
                        $sites[$site['url']] = $site;
                        $defaultSet |= $site['default'];
                    }
                }
            }
        }
        return $sites;
    }
public function getSites()
    {
        $sites = [];
        $defaultSet = false;
        if (!$this->getValid()) {
            return $sites;
        }
        foreach ($this->xml->children() as $child) {
            if ($child->getName() == "site") {
                $site = $this->parseSite($child);
                if ($site !== false) {
                    if ($defaultSet && $site['default']) {
                        $this->logger->error('There can be only one default site.');
                    } else {
                        $sites[$site['url']] = $site;
                        $defaultSet |= $site['default'];
                    }
                }
            }
        }
        return $sites;
    }
public function getSites ( ) { $ sites = [ ] ; $ defaultSet = false ; if ( ! $ this -> getValid ( ) ) { return $ sites ; } foreach ( $ this -> xml -> children ( ) as $ child ) { if ( $ child -> getName ( ) == "site" ) { $ site = $ this -> parseSite ( $ child ) ; if ( $ site !== false ) { if ( $ defaultSet && $ site [ 'default' ] ) { $ this -> logger -> error ( 'There can be only one default site.' ) ; } else { $ sites [ $ site [ 'url' ] ] = $ site ; $ defaultSet |= $ site [ 'default' ] ; } } } } return $ sites ; }
Get an array of sites from the configuration file.

@return array
Each site is keyed with its url. Each sites array contains:
- algorithm
- key
- url
- default
Get an array of sites from the configuration file .