Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- use Phalcon\Mvc\Url as UrlResolver;
- use Phalcon\Db\Adapter\Pdo\Mysql as DbAdapter;
- use Phalcon\Mvc\Model\Metadata\Memory as MetaDataAdapter;
- use Phalcon\Session\Adapter\Files as SessionAdapter;
- $di = new Phalcon\DI\FactoryDefault;
- $di->set('config', $config);
- $di->set('view', function () use ($config) {
- $view = new Phalcon\Mvc\View;
- $view->setViewsDir($config->application->viewsDir);
- $view->registerEngines(array(
- '.volt' => function ($view, $di) use ($config) {
- $volt = new Phalcon\Mvc\View\Engine\Volt($view, $di);
- $volt->setOptions(array(
- 'compiledPath' => $config->application->cacheDir,
- 'compiledSeparator' => '_'
- ));
- return $volt;
- },
- '.phtml' => 'Phalcon\Mvc\View\Engine\Php'
- ));
- return $view;
- }, true);
- $di->set('router', function () {
- return require __DIR__ . '/routes.php';
- });
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement