Class **Phalcon\\Mvc\\Application** =================================== *extends* abstract class :doc:`Phalcon\\DI\\Injectable ` *implements* :doc:`Phalcon\\Events\\EventsAwareInterface `, :doc:`Phalcon\\DI\\InjectionAwareInterface ` This component encapsulates all the complex operations behind instantiating every component needed and integrating it with the rest to allow the MVC pattern to operate as desired. .. code-block:: php registerModules(array( 'frontend' => array( 'className' => 'Multiple\Frontend\Module', 'path' => '../apps/frontend/Module.php' ), 'backend' => array( 'className' => 'Multiple\Backend\Module', 'path' => '../apps/backend/Module.php' ) )); } } $application = new Application(); $application->main(); Methods ------- public **__construct** ([:doc:`Phalcon\\DI ` $dependencyInjector]) public :doc:`Phalcon\\Mvc\\Application ` **useImplicitView** (*boolean* $implicitView) By default. The view is implicitly buffering all the output You can full disable the view component using this method public **registerModules** (*array* $modules, [*boolean* $merge]) Register an array of modules present in the application .. code-block:: php registerModules(array( 'frontend' => array( 'className' => 'Multiple\Frontend\Module', 'path' => '../apps/frontend/Module.php' ), 'backend' => array( 'className' => 'Multiple\Backend\Module', 'path' => '../apps/backend/Module.php' ) )); public *array* **getModules** () Return the modules registered in the application public :doc:`Phalcon\\Mvc\\Application ` **setDefaultModule** (*string* $defaultModule) Sets the module name to be used if the router doesn't return a valid module public *string* **getDefaultModule** () Returns the default module name public :doc:`Phalcon\\Http\\ResponseInterface ` **handle** ([*string* $uri]) Handles a MVC request public **setDI** (:doc:`Phalcon\\DiInterface ` $dependencyInjector) inherited from Phalcon\\DI\\Injectable Sets the dependency injector public :doc:`Phalcon\\DiInterface ` **getDI** () inherited from Phalcon\\DI\\Injectable Returns the internal dependency injector public **setEventsManager** (:doc:`Phalcon\\Events\\ManagerInterface ` $eventsManager) inherited from Phalcon\\DI\\Injectable Sets the event manager public :doc:`Phalcon\\Events\\ManagerInterface ` **getEventsManager** () inherited from Phalcon\\DI\\Injectable Returns the internal event manager public **__get** (*unknown* $property) inherited from Phalcon\\DI\\Injectable Magic method __get