Config
return new Config([
'application' => [
'controllersDir' => APP_DIR . '/controllers/',
'modelsDir' => APP_DIR . '/models/',
'formsDir' => APP_DIR . '/forms/',
'viewsDir' => APP_DIR . '/views/',
'libraryDir' => APP_DIR . '/library/',
'pluginsDir' => APP_DIR . '/plugins/',
'cacheDir' => APP_DIR . '/cache/',
'tasksDir' => APP_DIR . '/tasks/',
'eventsDir' => APP_DIR . '/events/',
'helpersDir' => APP_DIR . '/helpers/',
'baseUri' => 'https://www.domain.com/',
'publicUrl' => 'https://www.domain.com',
'partialsDir' => 'partials/',
'themesDir' => 'themes/',
]
);
Services
$di->set('config', $config);
$di->set('url', function () use ($config) {
$url = new UrlResolver();
$url->setBaseUri($config->application->baseUri);
return $url;
}, true);
$di->set('view', function () use ($config) {
$view = new View();
$view->setViewsDir($config->application->viewsDir);
$view->registerEngines(array(
'.volt' => function ($view, $di) use ($config) {
$volt = new VoltEngine($view, $di);
$volt->setOptions(array(
'compiledPath' => $config->application->cacheDir . 'volt/',
'compiledSeparator' => '_',
'compileAlways' => true
));
return $volt;
}
));
return $view;
}, true);
Local Server:
PHP Version 5.6.15
Apache 2.0 Handler
Live Server:
PHP Version 5.6.19
CGI/FastCGI
What do you need server information about extensions or modules?