extends abstract class Phalcon\Application
implements Phalcon\Di\InjectionAwareInterface, Phalcon\Events\EventsAwareInterface
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.
use Phalcon\Mvc\Application; class MyApp extends Application { /** * Register the services here to make them general or register * in the ModuleDefinition to make them module-specific */ protected function registerServices() { } /** * This method registers all the modules in the application */ public function main() { $this->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 MyApp(); $application->main();
By default. The view is implicitly buffering all the output You can full disable the view component using this method
Handles a MVC request
Phalcon\Application
Sets the events manager
Returns the internal event manager
Register an array of modules present in the application
$this->registerModules( [ 'frontend' => [ 'className' => 'Multiple\Frontend\Module', 'path' => '../apps/frontend/Module.php' ], 'backend' => [ 'className' => 'Multiple\Backend\Module', 'path' => '../apps/backend/Module.php' ] ] );
Return the modules registered in the application
Gets the module definition registered in the application via module name
Sets the module name to be used if the router doesn’t return a valid module
Returns the default module name
Sets the dependency injector
Returns the internal dependency injector
Magic method __get
© 2011–2016 Phalcon Framework Team
Licensed under the Creative Commons Attribution License 3.0.
https://docs.phalconphp.com/en/latest/api/Phalcon_Mvc_Application.html