cleaners = Uninstaller::instance()->cleaners; $related = $_REQUEST['related'] ?? ''; $entries = $_REQUEST['entries'] ?? []; $action = $_POST['action'] ?? ''; $cleaner = null; $combo = []; foreach ($this->cleaners as $k) { $combo[$k->name] = $k->id; if ($k->id == ($_REQUEST['part'] ?? '/')) { $cleaner = $k; } } if ($cleaner === null) { $related = ''; if (!($cleaner = $this->cleaners->get('caches'))) { throw new Exception(__('Failed to load cleaner')); } } $this->cleaner = $cleaner; $this->related = $related; $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; } }