Oara\Network\Publisher\AffiliateFuture::checkConnection PHP 메소드

checkConnection() 공개 메소드

public checkConnection ( ) : boolean
리턴 boolean
    public function checkConnection()
    {
        //If not login properly the construct launch an exception
        $connection = true;
        $urls = array();
        $urls[] = new \Oara\Curl\Request('http://affiliates.affiliatefuture.com/myaccount/invoices.aspx', array());
        $result = $this->_client->get($urls);
        if (!\preg_match("/Logout/", $result[0], $matches)) {
            $connection = false;
        }
        return $connection;
    }