Ejemplo n.º 1
0
 /**
  * Get text command from the message, if any.
  *
  * A blank message is treated as a subscribe command.
  *
  * @return string Text command if found, otherwise empty.
  */
 protected function get_text_command()
 {
     $stripped_text = $this->get_message_text();
     if (preg_match('/^\\s*$/', $stripped_text, $matches)) {
         return self::$ignore_method;
     }
     $unsubscribe_matcher = new Prompt_Unsubscribe_Matcher($stripped_text);
     if ($unsubscribe_matcher->matches()) {
         return self::$unsubscribe_method;
     }
     return '';
 }