| 1 | <?php |
||
| 18 | class purge |
||
| 19 | { |
||
| 20 | /** @var \phpbb\cache\driver\driver_interface */ |
||
| 21 | protected $cache; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * Constructor |
||
| 25 | * |
||
| 26 | * @param \phpbb\cache\driver\driver_interface $cache Cache jbject |
||
| 27 | * @access public |
||
| 28 | */ |
||
| 29 | public function __construct(\phpbb\cache\driver\driver_interface $cache) |
||
| 34 | |||
| 35 | /** |
||
| 36 | * Purge all MediaEmbed cache files |
||
| 37 | */ |
||
| 38 | public function purge() |
||
| 50 | } |
||
| 51 |
In PHP it is possible to write to properties without declaring them. For example, the following is perfectly valid PHP code:
Generally, it is a good practice to explictly declare properties to avoid accidental typos and provide IDE auto-completion: