Skip to content

Instantly share code, notes, and snippets.

@andresgutierrez
Created April 25, 2016 16:04
Show Gist options
  • Save andresgutierrez/a7b098d6d6aaf5f184a2a9e6de903d41 to your computer and use it in GitHub Desktop.
Save andresgutierrez/a7b098d6d6aaf5f184a2a9e6de903d41 to your computer and use it in GitHub Desktop.
<?php
use Phalcon\Mvc\View;
$di = new \Phalcon\Di\FactoryDefault();
$di->set('view',function(){
$view=new \Phalcon\Mvc\View\Simple;
$view->registerEngines([
'.volt'=>'Phalcon\Mvc\View\Engine\Volt' // this will produce error beacause it will be passed here as string https://github.com/phalcon/cphalcon/blob/2.1.x/phalcon/di.zep#L235(name parameter)
]);
return $view;
});
var_dump($di->get('view'));
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment