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