Created
April 25, 2016 16:04
-
-
Save andresgutierrez/a7b098d6d6aaf5f184a2a9e6de903d41 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?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