public function connect($serverLogin, $apikey)
    {
        $this->apiKey = $apikey;
        $this->serverLogin = $serverLogin;

        if (empty($this->apiKey)) {
            $this->console->writeln('MxKarma error: You need to define a api key');

            return;
        }

        if (empty($this->serverLogin)) {
            $this->console->writeln('MxKarma error: You need to define server login');

            return;
        }

        $params = [
            "serverLogin" => $serverLogin,
            "applicationIdentifier" => "eXpansion v ".AbstractApplication::EXPANSION_VERSION,
            "testMode" => "false",
        ];

        $this->console->writeln('> MxKarma attempting to connect...');
        $this->http->get(
            $this->buildUrl(
                "startSession", $params),
            [$this, "xConnect"]
        );
    }
public function connect($serverLogin, $apikey)
    {
        $this->apiKey = $apikey;
        $this->serverLogin = $serverLogin;

        if (empty($this->apiKey)) {
            $this->console->writeln('MxKarma error: You need to define a api key');

            return;
        }

        if (empty($this->serverLogin)) {
            $this->console->writeln('MxKarma error: You need to define server login');

            return;
        }

        $params = [
            "serverLogin" => $serverLogin,
            "applicationIdentifier" => "eXpansion v ".AbstractApplication::EXPANSION_VERSION,
            "testMode" => "false",
        ];

        $this->console->writeln('> MxKarma attempting to connect...');
        $this->http->get(
            $this->buildUrl(
                "startSession", $params),
            [$this, "xConnect"]
        );
    }
public function connect ( $ serverLogin , $ apikey ) { $ this -> apiKey = $ apikey ; $ this -> serverLogin = $ serverLogin ; if ( empty ( $ this -> apiKey ) ) { $ this -> console -> writeln ( 'MxKarma error: You need to define a api key' ) ; return ; } if ( empty ( $ this -> serverLogin ) ) { $ this -> console -> writeln ( 'MxKarma error: You need to define server login' ) ; return ; } $ params = [ "serverLogin" => $ serverLogin , "applicationIdentifier" => "eXpansion v " . AbstractApplication :: EXPANSION_VERSION , "testMode" => "false" , ] ; $ this -> console -> writeln ( '> MxKarma attempting to connect...' ) ; $ this -> http -> get ( $ this -> buildUrl ( "startSession" , $ params ) , [ $ this , "xConnect" ] ) ; }
connect to MX karma

@param string $serverLogin
@param string $apikey
@return  void
connect to MX karma