0, 'root' => '[SITEDB]', ); $defConfig = array_merge($defConfig, $parameters); $profile = $filter->clean($defConfig['profile'], 'int'); $root = $filter->clean($defConfig['root'], 'string'); // We need a valid profile ID if ($profile <= 0) { $profile = 1; } // We need a root if (empty($root)) { throw new \RuntimeException('Unknown database root', 500); } $session = Application::getInstance()->getContainer()->segment; $session->set('profile', $profile); // Load the configuration Platform::getInstance()->load_configuration($profile); /** @var \Solo\Model\Dbfilters $model */ $model = new Dbfilters(); return $model->make_listing($root); } }