cleaners = Uninstaller::instance()->cleaners; $entries = $_REQUEST['entries'] ?? []; $action = $_POST['action'] ?? ''; $cleaner = null; $combo = []; foreach ($this->cleaners->dump() as $k) { $combo[$k->name] = $k->id; if ($k->id == $_REQUEST['part']) { $cleaner = $k; } } if ($cleaner === null) { if (!($cleaner = $this->cleaners->get('caches'))) { throw new Exception(__('Failed to load cleaner')); } } $this->cleaner = $cleaner; $this->entries = is_array($entries) ? $entries : []; $this->action = is_string($action) ? $action : ''; $this->combo = $combo; } public static function init(): ManageVars { if (!(self::$container instanceof self)) { self::$container = new self(); } return self::$container; } }