| 1 | <?php |
||
| 10 | class HtmlStripperExtension extends \Twig_Extension |
||
| 11 | { |
||
| 12 | private $htmlStripper; |
||
| 13 | |||
| 14 | /** |
||
| 15 | * HtmlStripperExtension constructor. |
||
| 16 | */ |
||
| 17 | 3 | public function __construct() |
|
| 21 | |||
| 22 | |||
| 23 | /** |
||
| 24 | * This gets an array of the filters that this extension provides |
||
| 25 | * |
||
| 26 | * @return \Twig_SimpleFilter[] |
||
| 27 | */ |
||
| 28 | public function getFilters() |
||
| 34 | |||
| 35 | /** |
||
| 36 | * A convenient name for this extension |
||
| 37 | * |
||
| 38 | * @return string |
||
| 39 | */ |
||
| 40 | 1 | public function getName() |
|
| 44 | |||
| 45 | /** |
||
| 46 | * This is the extension itself, it's mostly a small wrapper around the actual parser. |
||
| 47 | * |
||
| 48 | * @param string $html |
||
| 49 | * |
||
| 50 | * @return string |
||
| 51 | */ |
||
| 52 | 1 | public function toText($html) |
|
| 56 | } |
||
| 57 |