Oara\Network\Publisher\FashionTraffic::getMerchantList PHP Метод

getMerchantList() публичный Метод

public getMerchantList ( ) : array
Результат array
    public function getMerchantList()
    {
        $merchants = array();
        $valuesFormExport = array();
        $urls = array();
        $urls[] = new \Oara\Curl\Request('http://system.fashiontraffic.com/stats/ajax_filter_options/Offers', $valuesFormExport);
        $exportReport = $this->_client->post($urls);
        $doc = new \DOMDocument();
        @$doc->loadHTML($exportReport[0]);
        $xpath = new \DOMXPath($doc);
        $results = $xpath->query('//option');
        foreach ($results as $result) {
            $cid = $result->attributes->getNamedItem("value")->nodeValue;
            $name = $result->nodeValue;
            $obj = array();
            $obj['cid'] = $cid;
            $obj['name'] = $name;
            $merchants[] = $obj;
        }
        return $merchants;
    }