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 Closure · Phalcon\Application\Exceptions\ModuleNotRegistered · Phalcon\Di\DiInterface · Phalcon\Di\Injectable · Phalcon\Events\EventsAwareInterface · Phalcon\Events\ManagerInterface · Phalcon\Events\Traits\EventsAwareTrait
Method Summary¶
public
__construct( DiInterface|null $container = null )
AbstractApplication constructor.
public
string
getDefaultModule()
Returns the default module name
public
mixed
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
public
void
setEventsManager( ManagerInterface $eventsManager )
Sets the events manager
Properties¶
protected
string
$defaultModule = ""
protected
TModule[]
$modules = []
Methods¶
__construct()¶
AbstractApplication constructor.
getDefaultModule()¶
Returns the default module name
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 use this class
\ExceptionPhalcon\Application\Exception
Application\Exceptions\ModuleNotRegistered¶
Class Source on GitHub
\ExceptionPhalcon\Application\ExceptionPhalcon\Application\Exceptions\ModuleNotRegistered
Uses Phalcon\Application\Exception