Oara\Network\Publisher\SilverTap::login PHP Метод

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

public login ( $credentials )
$credentials
    public function login($credentials)
    {
        $user = $credentials['user'];
        $password = $credentials['password'];
        $this->_serverUrl = "https://mats.silvertap.com/";
        $this->_client = new \Oara\Curl\Access($credentials);
        $loginUrl = $this->_serverUrl . 'Login.aspx?ReturnUrl=/';
        $valuesLogin = array(new \Oara\Curl\Parameter('txtUsername', $user), new \Oara\Curl\Parameter('txtPassword', $password), new \Oara\Curl\Parameter('cmdSubmit', 'Login'), new \Oara\Curl\Parameter('__EVENTTARGET', ''), new \Oara\Curl\Parameter('__EVENTARGUMENT', ''));
        $urls = array();
        $urls[] = new \Oara\Curl\Request($loginUrl, $valuesLogin);
        $this->_client->post($urls);
        $this->_exportPassword = \md5($password);
        $this->_exportUser = self::getExportUser();
    }