Ejemplo n.º 1
0
     $reply = chooseFunctionNum($keyword, $yixin);
 } elseif ($state['state'] == '1') {
     $mryw = new Mryw($keyword);
     $rst = $mryw->get();
     $reply = $yixin->makeNews($rst);
 } elseif ($state['state'] == '2') {
     $joke = new Joke($keyword);
     $rst = $joke->getJoke();
     $reply = $yixin->makeNews($rst);
 } elseif ($state['state'] == '3') {
     $beautiful = new Beautiful($keyword);
     $rst = $beautiful->getBeautifulPic();
     $reply = $yixin->makeNews($rst);
 } elseif ($state['state'] == '4') {
     $robot = new Robot($keyword);
     $rst = $robot->getReply();
     if (is_array($rst)) {
         $reply = $yixin->makeNews($rst);
     } else {
         $reply = $yixin->makeText($rst);
     }
 } elseif ($state['state'] == '5') {
     $weather = new Weather($keyword);
     $reply = $yixin->makeText($weather->getWeatherDetail());
 } elseif ($state['state'] == '6') {
     $youdao = new YouDaoTrans($keyword);
     $reply = $yixin->makeText($youdao->getTransContent());
 } elseif ($state['state'] == '7') {
     $mobile = new Mobile($keyword);
     $reply = $yixin->makeText($mobile->getMobileLocation());
 } elseif ($state['state'] == 'hzj') {