public function __construct(\ArrayAccess $container)
{
$this->pathManager = $container['pathmanager'];
if (!empty($container['classloader']) && $container['classloader'] instanceof ClassLoader) {
$this->root = $this->useLoader($container['classloader']);
} else {
$this->root = $this->setPath('root', $container['rootpath']);
}
if (!$container instanceof Application && !empty($container['request'])) {
$this->requestObject = $container['request'];
}
$this->setUrl('root', '/');
$this->setUrl('app', '/app/');
$this->setPath('apppath', 'app');
$this->setUrl('extensions', '/extensions/');
$this->setPath('extensionsconfig', 'app/config/extensions');
$this->setPath('extensionspath', 'extensions');
$this->setUrl('files', '/files/');
$this->setPath('filespath', 'files');
$this->setUrl('async', '/async/');
$this->setUrl('upload', '/upload/');
$this->setUrl('bolt', '/bolt/');
$this->setUrl('theme', '/theme/');
$this->setUrl('themes', '/theme/');
// Needed for filebrowser. See #5759
$this->setPath('web', '');
$this->setPath('cache', 'app/cache');
$this->setPath('config', 'app/config');
$this->setPath('src', dirname(__DIR__));
$this->setPath('database', 'app/database');
$this->setPath('themebase', 'theme');
$this->setPath('view', 'app/view');
$this->setUrl('view', '/app/view/');
}