Starts the framework.
More...
|
| static | run (array &$config) |
| | Handles the request.
|
| |
| static | init (array &$config) |
| | Initialize the app with $config array.
|
| |
| static | forward (string $url, bool $initialize=true, bool $finalize=true) |
| | Forwards to url.
|
| |
| static | getTemplateEngineInstance () |
| | Returns the template engine instance.
|
| |
| static | startDefaultTemplateEngine () |
| | Starts the default Template engine (Twig for Webtools).
|
| |
| static | runAction (array &$u, bool $initialize=true, bool $finalize=true) |
| | Runs an action on a controller.
|
| |
| static | runCallable (array &$u) |
| | Runs a callback.
|
| |
| static | injectDependencies ($controller) |
| | Injects the dependencies from the di config key in a controller.
|
| |
| static | runAsString (array &$u, bool $initialize=true, bool $finalize=true) |
| | Runs an action on a controller and returns a string.
|
| |
| static | onError (int $code, ?string $message=null, $controllerInstance=null) |
| |
| static | logError (int $code, string $message) |
| |
| static | getController () |
| | Returns the active controller name.
|
| |
| static | getControllerSimpleName () |
| | Returns the class simple name of the active controller.
|
| |
| static | getViewNameFileExtension () |
| | Returns the extension for view files.
|
| |
| static | getAction () |
| | Returns tha active action.
|
| |
| static | getActionParams () |
| | Returns the active parameters.
|
| |
| static | getFrameworkDir () |
| | Returns the framework directory.
|
| |
| static | getApplicationDir () |
| | Returns the application directory (app directory)
|
| |
| static | getApplicationName () |
| | Returns the application name.
|
| |
Starts the framework.
This class is part of Ubiquity
- Author
- jcheron myadd.nosp@m.ress.nosp@m.mail@.nosp@m.gmai.nosp@m.l.com
- Version
- 1.2.0
Definition at line 19 of file Startup.php.
◆ _getControllerInstance()
| static _getControllerInstance |
( |
string |
$controllerName | ) |
|
|
staticprotected |
◆ forward()
| static forward |
( |
string |
$url, |
|
|
bool |
$initialize = true, |
|
|
bool |
$finalize = true |
|
) |
| |
|
static |
Forwards to url.
- Parameters
-
| string | $url | The url to forward to |
| boolean | $initialize | If true, the initialize method of the controller is called |
| boolean | $finalize | If true, the finalize method of the controller is called |
Reimplemented in StartupAsync.
Definition at line 102 of file Startup.php.
◆ getAction()
Returns tha active action.
- Returns
- string
Definition at line 318 of file Startup.php.
◆ getActionParams()
| static getActionParams |
( |
| ) |
|
|
static |
Returns the active parameters.
- Returns
- array
Definition at line 327 of file Startup.php.
◆ getApplicationDir()
| static getApplicationDir |
( |
| ) |
|
|
static |
Returns the application directory (app directory)
- Returns
- string
Definition at line 345 of file Startup.php.
◆ getApplicationName()
| static getApplicationName |
( |
| ) |
|
|
static |
Returns the application name.
- Returns
- string
Definition at line 354 of file Startup.php.
◆ getController()
Returns the active controller name.
- Returns
- ?string
Definition at line 291 of file Startup.php.
◆ getControllerSimpleName()
| static getControllerSimpleName |
( |
| ) |
|
|
static |
Returns the class simple name of the active controller.
- Returns
- string
Definition at line 300 of file Startup.php.
◆ getFrameworkDir()
| static getFrameworkDir |
( |
| ) |
|
|
static |
Returns the framework directory.
- Returns
- string
Definition at line 336 of file Startup.php.
◆ getTemplateEngineInstance()
| static getTemplateEngineInstance |
( |
| ) |
|
|
static |
Returns the template engine instance.
- Returns
- TemplateEngine
Definition at line 125 of file Startup.php.
◆ getViewNameFileExtension()
| static getViewNameFileExtension |
( |
| ) |
|
|
static |
Returns the extension for view files.
- Returns
- string
Definition at line 309 of file Startup.php.
◆ init()
| static init |
( |
array & |
$config | ) |
|
|
static |
Initialize the app with $config array.
- Parameters
-
Definition at line 84 of file Startup.php.
◆ injectDependencies()
| static injectDependencies |
( |
|
$controller | ) |
|
|
static |
Injects the dependencies from the di config key in a controller.
- Parameters
-
| Controller | $controller | The controller |
Definition at line 225 of file Startup.php.
◆ logError()
| static logError |
( |
int |
$code, |
|
|
string |
$message |
|
) |
| |
|
static |
◆ onError()
| static onError |
( |
int |
$code, |
|
|
?string |
$message = null, |
|
|
|
$controllerInstance = null |
|
) |
| |
|
static |
◆ parseUrl()
| static parseUrl |
( |
& |
$url | ) |
|
|
staticprotected |
◆ run()
| static run |
( |
array & |
$config | ) |
|
|
static |
Handles the request.
- Parameters
-
| array | $config | The loaded config array |
Definition at line 74 of file Startup.php.
◆ runAction()
| static runAction |
( |
array & |
$u, |
|
|
bool |
$initialize = true, |
|
|
bool |
$finalize = true |
|
) |
| |
|
static |
Runs an action on a controller.
- Parameters
-
| array | $u | An array containing controller, action and parameters |
| boolean | $initialize | If true, the initialize method of the controller is called |
| boolean | $finalize | If true, the finalize method of the controller is called |
Reimplemented in StartupAsync.
Definition at line 155 of file Startup.php.
◆ runAsString()
| static runAsString |
( |
array & |
$u, |
|
|
bool |
$initialize = true, |
|
|
bool |
$finalize = true |
|
) |
| |
|
static |
Runs an action on a controller and returns a string.
- Parameters
-
| array | $u | |
| boolean | $initialize | If true, the initialize method of the controller is called |
| boolean | $finalize | If true, the finalize method of the controller is called |
- Returns
- string
Definition at line 254 of file Startup.php.
◆ runCallable()
| static runCallable |
( |
array & |
$u | ) |
|
|
static |
Runs a callback.
- Parameters
-
| array | $u | An array containing a callback, and some parameters |
Definition at line 208 of file Startup.php.
◆ setMainParams()
| static setMainParams |
( |
|
$controller, |
|
|
|
$mainParams |
|
) |
| |
|
staticprotected |
◆ startDefaultTemplateEngine()
| static startDefaultTemplateEngine |
( |
| ) |
|
|
static |
Starts the default Template engine (Twig for Webtools).
- Returns
- TemplateEngine
Definition at line 139 of file Startup.php.
◆ startTemplateEngine()
| static startTemplateEngine |
( |
array & |
$config | ) |
|
|
staticprotected |
◆ $action
◆ $actionParams
◆ $controller
◆ $templateEngine
◆ $urlParts
The documentation for this class was generated from the following file:
- C:/Users/myadd/Documents/GitHub/ubiquity-doc-api/vendor/phpmv/ubiquity/src/Ubiquity/controllers/Startup.php