1 | <?php |
||
17 | class HtmlStripperExtension extends \Twig_Extension |
||
18 | { |
||
19 | /** |
||
20 | * @var HtmlStripper |
||
21 | */ |
||
22 | private $htmlStripper; |
||
23 | |||
24 | /** |
||
25 | * HtmlStripperExtension constructor. |
||
26 | */ |
||
27 | 3 | public function __construct() |
|
31 | |||
32 | /** |
||
33 | * This gets an array of the filters that this extension provides. |
||
34 | * |
||
35 | * It'll return Twig_SimpleFilter on versions of twig less than ^1.0.0 of twig, and Twig_Filter on versions of |
||
36 | * twig ^2.0.0 |
||
37 | * |
||
38 | * @return \Twig_SimpleFilter[]|\Twig_Filter[] |
||
39 | */ |
||
40 | public function getFilters() |
||
60 | |||
61 | /** |
||
62 | * A convenient name for this extension. |
||
63 | * |
||
64 | * BC Twig ^v1.0.0 |
||
65 | * |
||
66 | * @return string |
||
67 | */ |
||
68 | 1 | public function getName() |
|
72 | |||
73 | /** |
||
74 | * This is the extension itself, it's mostly a small wrapper around the actual parser. |
||
75 | * |
||
76 | * @see https://github.com/PurpleBooth/htmlstrip |
||
77 | * @deprecated v1.1.0 This will be removed in the future, please use the PurpleBooth/htmlstrip library |
||
78 | * |
||
79 | * @param string $html |
||
80 | * |
||
81 | * @return string |
||
82 | */ |
||
83 | 1 | public function toText($html) |
|
87 | } |
||
88 |