Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

How to disable the views in any application?

I am creating an application with various modules and currently it uses the following code to disable all the view in each module:

namespace Multiple\Frontend;

 class Module {

     public function registerAutoloaders() {
         $loader = new \Phalcon\Loader();
             'Multiple\Frontend\Controllers' => __DIR__ . '/controllers/',
             'Multiple\Frontend\Models'      => __DIR__ . '/models/',

     public function registerServices($di) {
         $di->set('dispatcher', function() {
             $dispatcher = new \Phalcon\Mvc\Dispatcher();
             return $dispatcher;
         $di->set('view', function() {
             $view = new \Phalcon\Mvc\View();
             $view->disable(); // <---------------------------------------------------
             return $view;


I would like to know there is a smarter way to do this only once for the entire system.


You can use Phalcon\Mvc\Application::useImplicitView(false) to globally disable the view