Moinax\TvDb\Client::getMirrors PHP Method

getMirrors() protected method

Get a list of mirrors available to fetchXml the data from the api
protected getMirrors ( ) : void
return void
    protected function getMirrors()
    {
        $data = $this->httpClient->fetch($this->baseUrl . '/api/' . $this->apiKey . '/mirrors.xml');
        $mirrors = $this->getXml($data);
        foreach ($mirrors->Mirror as $mirror) {
            $typeMask = (int) $mirror->typemask;
            $mirrorPath = (string) $mirror->mirrorpath;
            if ($typeMask & self::MIRROR_TYPE_XML) {
                $this->mirrors[self::MIRROR_TYPE_XML][] = $mirrorPath;
            }
            if ($typeMask & self::MIRROR_TYPE_BANNER) {
                $this->mirrors[self::MIRROR_TYPE_BANNER][] = $mirrorPath;
            }
            if ($typeMask & self::MIRROR_TYPE_ZIP) {
                $this->mirrors[self::MIRROR_TYPE_ZIP][] = $mirrorPath;
            }
        }
    }