return self::$tokens[$this->id];
}
+ function escape($text)
+ {
+ return str_replace(array(
+ '\\', '_', '*', '[', ']', '(', ')', '~', '`', '>',
+ '<', '&', '#', '+', '-', '=', '|', '{', '}', '.', '!'
+ ), array(
+ '\\\\', '\\_', '\\*', '\\[', '\\]', '\\(', '\\)', '\\~', '\\`', '\\>',
+ '\\<', '\\&', '\\#', '\\+', '\\-', '\\=', '\\|', '\\{', '\\}', '\\.', '\\!'
+ ),
+ $text);
+ }
+
}
);
- function __construct($tg, $o=false)
- {
-
-
- parent::__construct($tg, $o);
- if (!empty($this->text)) {
- $this->text = str_replace(array(
- '\\', '_', '*', '[', ']', '(', ')', '~', '`', '>',
- '<', '&', '#', '+', '-', '=', '|', '{', '}', '.', '!'
- ), array(
- '\\\\', '\\_', '\\*', '\\[', '\\]', '\\(', '\\)', '\\~', '\\`', '\\>',
- '\\<', '\\&', '\\#', '\\+', '\\-', '\\=', '\\|', '\\{', '\\}', '\\.', '\\!'
- ),
- $this->text);
-
-
- }
-
- }
+
function send()
{