1 | <?php |
||
13 | class trim |
||
14 | { |
||
15 | /** @var array An array of trim tools */ |
||
16 | protected $tools; |
||
17 | |||
18 | /** |
||
19 | * Constructor |
||
20 | * |
||
21 | * @param manager $manager |
||
22 | * @access public |
||
23 | */ |
||
24 | public function __construct(manager $manager) |
||
28 | |||
29 | /** |
||
30 | * Trim and clean text |
||
31 | * |
||
32 | * @param string $message Message text |
||
33 | * @param int $length The length to trim text to |
||
34 | * @return string Trimmed message text |
||
35 | * @access protected |
||
36 | */ |
||
37 | public function trim_text($message, $length) |
||
59 | |||
60 | /** |
||
61 | * Convert and preserve line breaks |
||
62 | * http://stackoverflow.com/questions/816085/removing-redundant-line-breaks-with-regular-expressions |
||
63 | * |
||
64 | * @param string $message Message text |
||
65 | * @return string Message text with line breaks |
||
66 | * @access protected |
||
67 | */ |
||
68 | protected function tp_nl2br($message) |
||
72 | } |
||
73 |