| 1 | <?php |
||
| 13 | class Cleaner implements EventSubscriberInterface |
||
| 14 | { |
||
| 15 | /** @var TempDirectory */ |
||
| 16 | private $tempDirectory; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Cleaner constructor. |
||
| 20 | * @param TempDirectory $tempDirectory |
||
| 21 | */ |
||
| 22 | 15 | public function __construct(TempDirectory $tempDirectory) |
|
| 26 | |||
| 27 | 56 | public static function getSubscribedEvents(): array |
|
| 34 | |||
| 35 | 15 | public function purgeCurrentTempDir() |
|
| 39 | |||
| 40 | /** |
||
| 41 | * @param string $dir |
||
| 42 | * @return bool True if the directory existed and it has been deleted |
||
| 43 | */ |
||
| 44 | 56 | public static function cleanUpDir(string $dir): bool |
|
| 63 | } |
||
| 64 |