protected function createAlexaRequest($request) {
    	$this->voiceInterface = 'Alexa';

        // Create AlexaRequest from HTTP request
        $this->alexaRequest = new AlexaRequest(
            $request->getBody()->getContents(),
            $this->askApplicationIds,
	        $request->getHeaderLine('Signaturecertchainurl'),
	        $request->getHeaderLine('Signature'),
	        $this->settings['validateTimestamp'],
	        $this->settings['validateCertificate']
        );

        // Update auto initialized translator as Alexa request might contain a locale
        if($this->alexaRequest->getRequest()->getLocale() && in_array('translator', $this->settings['auto_init'])) {
            $this->translator->chooseLocale($this->alexaRequest->getRequest()->getLocale());
        }

		// Create new AlexaResponse
	    $this->alexaResponse = new AlexaResponse;
    }
protected function createAlexaRequest($request) {
    	$this->voiceInterface = 'Alexa';

        // Create AlexaRequest from HTTP request
        $this->alexaRequest = new AlexaRequest(
            $request->getBody()->getContents(),
            $this->askApplicationIds,
	        $request->getHeaderLine('Signaturecertchainurl'),
	        $request->getHeaderLine('Signature'),
	        $this->settings['validateTimestamp'],
	        $this->settings['validateCertificate']
        );

        // Update auto initialized translator as Alexa request might contain a locale
        if($this->alexaRequest->getRequest()->getLocale() && in_array('translator', $this->settings['auto_init'])) {
            $this->translator->chooseLocale($this->alexaRequest->getRequest()->getLocale());
        }

		// Create new AlexaResponse
	    $this->alexaResponse = new AlexaResponse;
    }
protected function createAlexaRequest ( $ request ) { $ this -> voiceInterface = 'Alexa' ; // Create AlexaRequest from HTTP request $ this -> alexaRequest = new AlexaRequest ( $ request -> getBody ( ) -> getContents ( ) , $ this -> askApplicationIds , $ request -> getHeaderLine ( 'Signaturecertchainurl' ) , $ request -> getHeaderLine ( 'Signature' ) , $ this -> settings [ 'validateTimestamp' ] , $ this -> settings [ 'validateCertificate' ] ) ; // Update auto initialized translator as Alexa request might contain a locale if ( $ this -> alexaRequest -> getRequest ( ) -> getLocale ( ) && in_array ( 'translator' , $ this -> settings [ 'auto_init' ] ) ) { $ this -> translator -> chooseLocale ( $ this -> alexaRequest -> getRequest ( ) -> getLocale ( ) ) ; } // Create new AlexaResponse $ this -> alexaResponse = new AlexaResponse ; }
Create Alexa Request from Slim Request

@param   \Slim\Http\Request      $request    Slim request
@access  protected
@author  a.schmidt@internet-of-voice.de
Create Alexa Request from Slim Request