Oara\Network\Publisher\NetAffiliation::checkConnection PHP Method

checkConnection() public method

public checkConnection ( ) : boolean
return boolean
    public function checkConnection()
    {
        $connection = true;
        //Checking connection to the platform
        $valuesFormExport = array();
        $urls = array();
        $urls[] = new \Oara\Curl\Request('http://www' . $this->_serverNumber . '.netaffiliation.com/index.php/', $valuesFormExport);
        $exportReport = $this->_client->get($urls);
        if (!\preg_match("/logout/", $exportReport[0], $matches) || !isset($this->_credentials["apipassword"])) {
            $connection = false;
        }
        return $connection;
    }