function kodiCmd_vocal_command(&$response, $actionUrl) { global $_, $conf; $response['commands'][] = array('command' => $conf->get('VOCAL_ENTITY_NAME') . ', active KODI', 'url' => $actionUrl . '?action=kodiCmd_recognition_status&state=1&webservice=true', 'confidence' => 0.8); $response['commands'][] = array('command' => $conf->get('VOCAL_ENTITY_NAME') . ', désactive KODI', 'url' => $actionUrl . '?action=kodiCmd_recognition_status&state=0&webservice=true', 'confidence' => 0.8); $kodiManager = new KodiCmd(); $kodiCmds = $kodiManager->populate(); foreach ($kodiCmds as $kodiCmd) { $response['commands'][] = array('command' => '' . $kodiCmd->getName(), 'url' => $actionUrl . '?action=kodiCmd_change_state&engine=' . $kodiCmd->getID() . '&webservice=true', 'confidence' => $kodiCmd->getConfidence()); } }