1 | <?php |
||
10 | class Response |
||
11 | { |
||
12 | /** |
||
13 | * @var string |
||
14 | */ |
||
15 | protected $content = ''; |
||
16 | |||
17 | /** |
||
18 | * @var bool |
||
19 | */ |
||
20 | protected $empty = true; |
||
21 | |||
22 | /** |
||
23 | * Response constructor. |
||
24 | * @param string $content |
||
25 | */ |
||
26 | public function __construct($content = '') |
||
30 | |||
31 | /** |
||
32 | * @param $result |
||
33 | * @return null|string |
||
34 | */ |
||
35 | protected function parse($result) |
||
57 | |||
58 | /** |
||
59 | * @return string |
||
60 | */ |
||
61 | public function getContent() |
||
65 | |||
66 | /** |
||
67 | * @param $content |
||
68 | * @return Response |
||
69 | */ |
||
70 | public function setContent($content) |
||
79 | |||
80 | /** |
||
81 | * @return boolean |
||
82 | */ |
||
83 | public function isEmpty() |
||
87 | |||
88 | /** |
||
89 | * @return Response |
||
90 | */ |
||
91 | public function italic() |
||
95 | |||
96 | /** |
||
97 | * @return Response |
||
98 | */ |
||
99 | public function bold() |
||
103 | |||
104 | /** |
||
105 | * @param string|null $lang |
||
106 | * @return Response |
||
107 | */ |
||
108 | public function code(string $lang = null) |
||
115 | |||
116 | /** |
||
117 | * @param $src |
||
118 | * @param bool $after |
||
119 | * @return Response |
||
120 | */ |
||
121 | public function image($src, $after = true) |
||
129 | |||
130 | /** |
||
131 | * @param bool $after |
||
132 | * @return Response |
||
133 | */ |
||
134 | public function hr($after = true) |
||
141 | |||
142 | /** |
||
143 | * @return Response |
||
144 | */ |
||
145 | public function quote() |
||
149 | |||
150 | /** |
||
151 | * @param string $symbol |
||
152 | * @param string|null $symbolAfter |
||
153 | * @return Response |
||
154 | */ |
||
155 | public function wrap(string $symbol, string $symbolAfter = null) |
||
164 | |||
165 | /** |
||
166 | * @param $text |
||
167 | * @param bool $newline |
||
168 | * @return Response |
||
169 | */ |
||
170 | public function before($text, $newline = false) |
||
174 | |||
175 | /** |
||
176 | * @param $text |
||
177 | * @param bool $newline |
||
178 | * @return Response |
||
179 | */ |
||
180 | public function after($text, $newline = false) |
||
184 | } |
||
185 |