getCustomInput() 공개 메소드

Get custom input string for debug purposes
public getCustomInput ( ) : string
리턴 string
예제 #1
0
 /**
  * Set input from custom input or stdin and return it
  *
  * @return string
  */
 public static function getInput()
 {
     if ($input = self::$telegram->getCustomInput()) {
         self::setInputRaw($input);
     } else {
         self::setInputRaw(file_get_contents('php://input'));
     }
     self::log(self::$input);
     return self::$input;
 }
예제 #2
0
 /**
  * Set input from custom input or stdin and return it
  *
  * @return string
  */
 public static function getInput()
 {
     // First check if a custom input has been set, else get the PHP input.
     if (!($input = self::$telegram->getCustomInput())) {
         $input = file_get_contents('php://input');
     }
     // Make sure we have a string to work with.
     if (is_string($input)) {
         self::$input = $input;
     } else {
         throw new TelegramException('Input must be a string!');
     }
     TelegramLog::update(self::$input);
     return self::$input;
 }