App

Extends \Ascmvc\AbstractApp

Class App

The abstract AbstractApp class is the blueprint for the MVC's main engine.

package

Ascmvc\Mvc

Methods

Protected method : this class cannot be copied because it is a Singleton.

__clone() : \Ascmvc\void.
inherited abstract

Response

\Ascmvc\void.

This class should be a Singleton, but instantiation is needed for compatibility with Swoole.

__construct() : \Ascmvc\void.
inherited abstract

Response

\Ascmvc\void.

Adds an element to the application's base configuration.

appendBaseConfig(string $name, array $array) : \Ascmvc\AbstractApp
inherited abstract

Arguments

$name

string

$array

array

Response

\Ascmvc\AbstractApp

Builds the baseConfig array from the various configuration files.

boot() : array
inherited abstract

Response

array

Sends the final response to the output buffer.

display(\Laminas\Diactoros\Response $response) : void
inherited abstract

Arguments

$response

\Laminas\Diactoros\Response

Gets the application's base configuration.

getBaseConfig() : array
inherited abstract

Response

array

Gets what is useful to the controllers from the application's base configuration.

getBaseConfigForControllers() : array
inherited abstract

Response

array

Gets the AbstractController object.

getController() : \Ascmvc\AbstractController|null
inherited abstract

Gets the AbstractControllerManager object.

getControllerManager() : \Ascmvc\AbstractControllerManager
inherited abstract

Gets the Controller's output.

getControllerOutput() : \Laminas\Diactoros\Response|array|string|null
inherited abstract

Response

\Laminas\Diactoros\Response|array|string|null

Gets the AscmvcEvent object.

getEvent() : \Ascmvc\Mvc\AscmvcEvent
inherited abstract

Gets the AscmvcEventManager object.

getEventManager() : \Ascmvc\Mvc\AscmvcEventManager
inherited abstract

Static method : returns the Singleton instance of this class.

getInstance() : \Ascmvc\AbstractApp
inherited static

Gets the ServerRequestInterface object.

getRequest() : \Psr\Http\Message\ServerRequestInterface
inherited abstract

Response

\Psr\Http\Message\ServerRequestInterface

Gets the Response object.

getResponse() : \Psr\Http\Message\ResponseInterface
inherited abstract

Response

\Psr\Http\Message\ResponseInterface

Gets the AbstractRouter object.

getRouter() : \Ascmvc\AbstractRouter
inherited abstract

Gets the Pimple\Container object.

getServiceManager() : \Pimple\Container
inherited abstract

Response

\Pimple\Container

Gets the SessionManager.

getSessionManager() : \Ascmvc\Session\SessionManager|null
inherited abstract

Gets the Template Manager object.

getViewObject() : \League\Plates\Engine|\Smarty|\Twig_Environment
inherited abstract

Response

\League\Plates\Engine|\Smarty|\Twig_Environment

Initializes the application with the parameters that are given in the baseConfig array.

initialize(array &$baseConfig) : \Ascmvc\AbstractApp
inherited abstract

Arguments

$baseConfig

array

Response

\Ascmvc\AbstractApp

Checks if the application is running inside a Swoole coroutine or not.

isSwoole() : boolean

Response

boolean

Renders the response.

render(\Laminas\Diactoros\Response|array|string $controllerOutput) : \Laminas\Diactoros\Response
inherited abstract

Arguments

$controllerOutput

\Laminas\Diactoros\Response|array|string

Response

\Laminas\Diactoros\Response

The application's main runtime method. It executes the Application's bootstrap events.

run() : void
inherited abstract

Sets the AbstractController object.

setController(\Ascmvc\AbstractController &$controller) : \Ascmvc\AbstractApp
inherited abstract

Arguments

Response

\Ascmvc\AbstractApp

Sets the AbstractControllerManager object.

setControllerManager(\Ascmvc\AbstractControllerManager &$controllerManager) : \Ascmvc\AbstractApp
inherited abstract

Arguments

Response

\Ascmvc\AbstractApp

Sets the Controller's output.

setControllerOutput(array $controllerOutput) : \Ascmvc\AbstractApp
inherited abstract

Arguments

$controllerOutput

array

Response

\Ascmvc\AbstractApp

Sets the AscmvcEvent object.

setEvent(\Ascmvc\Mvc\AscmvcEvent &$event) : \Ascmvc\AbstractApp
inherited abstract

Arguments

Response

\Ascmvc\AbstractApp

Sets the AscmvcEventManager object.

setEventManager(\Ascmvc\Mvc\AscmvcEventManager &$eventManager) : \Ascmvc\AbstractApp
inherited abstract

Arguments

Response

\Ascmvc\AbstractApp

Sets the ServerRequestInterface object.

setRequest(\Psr\Http\Message\ServerRequestInterface $request) : \Psr\Http\Message\ServerRequestInterface
inherited abstract

Arguments

$request

\Psr\Http\Message\ServerRequestInterface

Response

\Psr\Http\Message\ServerRequestInterface

Sets the Response object.

setResponse(\Psr\Http\Message\ResponseInterface $response) : \Psr\Http\Message\ResponseInterface
inherited abstract

Arguments

$response

\Psr\Http\Message\ResponseInterface

Response

\Psr\Http\Message\ResponseInterface

Sets the AbstractRouter object.

setRouter(\Ascmvc\AbstractRouter &$router) : \Ascmvc\AbstractApp
inherited abstract

Arguments

Response

\Ascmvc\AbstractApp

Sets the Pimple\Container object.

setServiceManager(\Pimple\Container &$serviceManager) : \Ascmvc\AbstractApp
inherited abstract

Arguments

$serviceManager

\Pimple\Container

Response

\Ascmvc\AbstractApp

Sets the SessionManager.

setSessionManager(\Ascmvc\Session\SessionManager $sessionManager) : \Ascmvc\Session\SessionManager|null
inherited abstract

Arguments

Response

\Ascmvc\Session\SessionManager|null

Sets the Template Manager object.

setViewObject( &$viewObject) : \Ascmvc\AbstractApp
inherited abstract

Arguments

$viewObject

Response

\Ascmvc\AbstractApp

Properties

Indicates if the application is running inside a Swoole coroutine or not.

swoole : boolean
var

Type(s)

boolean

Contains the Singleton instance of this class.

appInstance : \Ascmvc\AbstractApp|null
inherited static
var

Type(s)

\Ascmvc\AbstractApp|null

Array contains all of the AbstractApp's basic configurations.

baseConfig : array|null
inherited
var

Type(s)

array|null

Contains a reference to a Request instance.

request : \Laminas\Diactoros\Request|null
inherited
var

Type(s)

\Laminas\Diactoros\Request|null

Contains a reference to a Response instance.

response : \Laminas\Diactoros\Response|null
inherited
var

Type(s)

\Laminas\Diactoros\Response|null

Contains a reference to the SessionManager instance.

sessionManager : \Ascmvc\Session\SessionManager|null
inherited

Contains a reference to a \Pimple\Container instance.

serviceManager : \Pimple\Container|null
inherited
var

Type(s)

\Pimple\Container|null

Contains a reference to the AscmvcEventManager instance.

eventManager : \Ascmvc\Mvc\AscmvcEventManager|null
inherited

Contains a reference to the AscmvcEvent instance.

event : \Ascmvc\Mvc\AscmvcEvent|null
inherited
var

Type(s)

\Ascmvc\Mvc\AscmvcEvent|null

Contains a reference to a Template Manager instance.

viewObject : Object|null
inherited
var

Type(s)

Object|null

Contains a reference to an AbstractRouter instance.

router : \Ascmvc\AbstractRouter|null
inherited
var

Type(s)

\Ascmvc\AbstractRouter|null

Contains a reference to a AbstractControllerManager instance.

controllerManager : \Ascmvc\AbstractControllerManager|null
inherited

Contains a reference to a AbstractController instance.

controller : \Ascmvc\AbstractController|null
inherited
var

Type(s)

\Ascmvc\AbstractController|null

Contains the controller's output.

controllerOutput : \Laminas\Diactoros\Response|array|string|null
inherited
var

Type(s)

\Laminas\Diactoros\Response|array|string|null