Phalcon application
NOTE
All classes are prefixed with Phalcon
Application\AbstractApplication¶
Abstract Source on GitHub
Base class for Phalcon\Cli\Console and Phalcon\Mvc\Application.
stdClassPhalcon\Di\InjectablePhalcon\Application\AbstractApplication- implementsPhalcon\Events\EventsAwareInterface
Uses Phalcon\Application\Exceptions\ModuleNotRegistered · Phalcon\Di\DiInterface · Phalcon\Di\Injectable · Phalcon\Events\EventsAwareInterface · Phalcon\Events\ManagerInterface
Method Summary¶
public
__construct( DiInterface $container = null )
Phalcon\AbstractApplication constructor
public
string
getDefaultModule()
Returns the default module name
public
ManagerInterface|null
getEventsManager()
Returns the internal event manager
public
array|object
getModule( string $name )
Gets the module definition registered in the application via module name
public
array
getModules()
Return the modules registered in the application
public
static
registerModules(array $modules,bool $merge = false)
Register an array of modules present in the application
public
static
setDefaultModule( string $defaultModule )
Sets the module name to be used if the router does not return a valid module
public
void
setEventsManager( ManagerInterface $eventsManager )
Sets the events manager
Properties¶
protected
string
$defaultModule = ""
protected
ManagerInterface|null
$eventsManager = null
protected
array
$modules = []
Methods¶
__construct()¶
Phalcon\AbstractApplication constructor
getDefaultModule()¶
Returns the default module name
getEventsManager()¶
Returns the internal event manager
getModule()¶
Gets the module definition registered in the application via module name
getModules()¶
Return the modules registered in the application
registerModules()¶
Register an array of modules present in the application
$this->registerModules(
[
"frontend" => [
"className" => \Multiple\Frontend\Module::class,
"path" => "../apps/frontend/Module.php",
],
"backend" => [
"className" => \Multiple\Backend\Module::class,
"path" => "../apps/backend/Module.php",
],
]
);
setDefaultModule()¶
Sets the module name to be used if the router does not return a valid module
setEventsManager()¶
Sets the events manager
Application\Exception¶
Class Source on GitHub
Exceptions thrown in Phalcon\Application class will use this class
\ExceptionPhalcon\Application\Exception
Application\Exceptions\ModuleNotRegistered¶
Class Source on GitHub
\ExceptionPhalcon\Application\ExceptionPhalcon\Application\Exceptions\ModuleNotRegistered
Uses Phalcon\Application\Exception