private function setAppToken($app_token)
    {
        if (!preg_match(self::APP_TOKEN_VALIDATION_REGEX, $app_token)) {
            throw new MonetivoException('App token format is invalid');
        }
        $this->app_token = $app_token;

        // determine proper environment
        $this->setEnvironment($app_token);
    }
private function setAppToken($app_token)
    {
        if (!preg_match(self::APP_TOKEN_VALIDATION_REGEX, $app_token)) {
            throw new MonetivoException('App token format is invalid');
        }
        $this->app_token = $app_token;

        // determine proper environment
        $this->setEnvironment($app_token);
    }
private function setAppToken ( $ app_token ) { if ( ! preg_match ( self :: APP_TOKEN_VALIDATION_REGEX , $ app_token ) ) { throw new MonetivoException ( 'App token format is invalid' ) ; } $ this -> app_token = $ app_token ; // determine proper environment $ this -> setEnvironment ( $ app_token ) ; }
Sets application token and environment
@param string $app_token
@throws MonetivoException
Sets application token and environment