| Total Complexity | 4 |
| Total Lines | 39 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 14 | class NavigateHomeRequestHandler extends AbstractRequestHandler |
||
| 15 | { |
||
| 16 | /** |
||
| 17 | * @var ResponseHelper |
||
| 18 | */ |
||
| 19 | private $responseHelper; |
||
| 20 | |||
| 21 | /** |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | private $output; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * @param ResponseHelper $responseHelper |
||
| 28 | * @param string $output |
||
| 29 | * @param array $supportedApplicationIds |
||
| 30 | */ |
||
| 31 | public function __construct(ResponseHelper $responseHelper, string $output, array $supportedApplicationIds) |
||
| 32 | { |
||
| 33 | $this->responseHelper = $responseHelper; |
||
| 34 | $this->output = $output; |
||
| 35 | $this->supportedApplicationIds = $supportedApplicationIds; |
||
| 36 | } |
||
| 37 | |||
| 38 | /** |
||
| 39 | * {@inheritdoc} |
||
| 40 | */ |
||
| 41 | public function supportsRequest(Request $request): bool |
||
| 42 | { |
||
| 43 | // support amazon navigate home request, amazon default intents are prefixed with "AMAZON." |
||
| 44 | return $request->request instanceof IntentRequest && 'AMAZON.NavigateHomeIntent' === $request->request->intent->name; |
||
| 45 | } |
||
| 46 | |||
| 47 | /** |
||
| 48 | * {@inheritdoc} |
||
| 49 | */ |
||
| 50 | public function handleRequest(Request $request): Response |
||
| 53 | } |
||
| 54 | } |
||
| 55 |