public function respond(string $text, $endSession = false): Response
    {
        $outputSpeech = OutputSpeech::createByText($text);

        $this->responseBody->outputSpeech     = $outputSpeech;
        $this->responseBody->shouldEndSession = $endSession;

        return $this->response;
    }
public function respond(string $text, $endSession = false): Response
    {
        $outputSpeech = OutputSpeech::createByText($text);

        $this->responseBody->outputSpeech     = $outputSpeech;
        $this->responseBody->shouldEndSession = $endSession;

        return $this->response;
    }
public function respond ( string $ text , $ endSession = false ) : Response { $ outputSpeech = OutputSpeech :: createByText ( $ text ) ; $ this -> responseBody -> outputSpeech = $ outputSpeech ; $ this -> responseBody -> shouldEndSession = $ endSession ; return $ this -> response ; }
Add a plaintext respond to response.

@param string $text
@param bool   $endSession

@return Response
Add a plaintext respond to response .