| 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 | * @param string $html |
||
| 53 | * |
||
| 54 | * @return string |
||
| 55 | */ |
||
| 56 | 1 | public function toText($html) |
|
| 60 | } |
||
| 61 |