for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace MaxBeckers\AmazonAlexa\Response;
/**
* @author Maximilian Beckers <[email protected]>
*/
class OutputSpeech
{
const TYPE_PLAINTEXT = 'PlainText';
const TYPE_SSML = 'SSML';
* @var string
public $type;
public $text;
public $ssml;
* @param string $type
public function __construct(string $type = self::TYPE_PLAINTEXT)
$this->type = $type;
}
* @param string $test
*
* @return OutputSpeech
public static function createByText(string $test): self
$outputSpeech = new self();
$outputSpeech->text = $test;
return $outputSpeech;
* @param string $ssml
public static function createBySsml(string $ssml): self
$outputSpeech = new self(self::TYPE_SSML);
$outputSpeech->ssml = $ssml;