1 | <?php |
||
10 | class HtmlStripperExtension extends \Twig_Extension |
||
11 | { |
||
12 | |||
13 | /** |
||
14 | * @var HtmlStripper |
||
15 | */ |
||
16 | private $htmlStripper; |
||
17 | |||
18 | /** |
||
19 | * HtmlStripperExtension constructor. |
||
20 | */ |
||
21 | 3 | public function __construct() |
|
25 | |||
26 | |||
27 | /** |
||
28 | * This gets an array of the filters that this extension provides |
||
29 | * |
||
30 | * @return \Twig_SimpleFilter[] |
||
31 | */ |
||
32 | public function getFilters() |
||
38 | |||
39 | /** |
||
40 | * A convenient name for this extension |
||
41 | * |
||
42 | * @return string |
||
43 | */ |
||
44 | 1 | public function getName() |
|
48 | |||
49 | /** |
||
50 | * This is the extension itself, it's mostly a small wrapper around the actual parser. |
||
51 | * |
||
52 | * @see https://github.com/PurpleBooth/htmlstrip |
||
53 | * @deprecated v1.1.0 This will be removed in the future, please use the PurpleBooth/htmlstrip library |
||
54 | * |
||
55 | * @param string $html |
||
56 | * |
||
57 | * @return string |
||
58 | */ |
||
59 | 1 | public function toText($html) |
|
63 | } |
||
64 |