Esempio n. 1
0
 public static function step2($_feedback)
 {
     $txt_text = "نظر ارزشمند شما در ثبت شد.\n";
     $txt_text .= "ممنون از همراهیتان.";
     if (strlen($_feedback) < 10) {
         $txt_text = "ممنون!\n";
         // not registerd!
     }
     self::saveComment($_feedback);
     $result = [['text' => $txt_text, 'reply_markup' => step::get('menu')]];
     step::stop();
     return $result;
 }
Esempio n. 2
0
 /**
  * on successful ending call caller step
  * @return [type] [description]
  */
 private static function successful()
 {
     // generate caller function to continue last step
     $funcName = '\\' . step::get('call_from') . "::" . step::get('call_from_step');
     // stop registration after use variables
     step::stop();
     if (is_callable($funcName)) {
         // get and return response
         $result = call_user_func($funcName, true, true);
     } else {
         $txt = T_('Return');
         $result = ['text' => $txt, 'reply_markup' => step::get('call_default_menu')];
         // show main menu
     }
     return $result;
 }