Esempio n. 1
0
function get($arr)
{
    $music = new Music();
    if (isset($arr['songs'])) {
        return getSongs();
    } else {
        $result = array('on' => $music->isOn() ? 1 : 0, 'play' => $music->isPlay() ? 1 : 0, 'welcome' => isWelcomeMusic($arr['api']), 'vol' => $music->getVol(), 'songs' => getSongs());
        http_response_code(202);
        return $result;
    }
}