AbstractApp

Class AbstractApp

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

package

Ascmvc

Methods

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

__clone() : \Ascmvc\void.
abstract

Response

\Ascmvc\void.

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

__construct() : \Ascmvc\void.
abstract

Response

\Ascmvc\void.

Adds an element to the application's base configuration.

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

Arguments

$name

string

$array

array

Response

\Ascmvc\AbstractApp

Builds the baseConfig array from the various configuration files.

boot() : array
abstract

Response

array

Sends the final response to the output buffer.

display(\Zend\Diactoros\Response $response) : void
abstract

Arguments

$response

\Zend\Diactoros\Response

Gets the application's base configuration.

getBaseConfig() : array
abstract

Response

array

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

getBaseConfigForControllers() : array
abstract

Response

array

Gets the AbstractController object.

getController() : \Ascmvc\AbstractController|null
abstract

Gets the AbstractControllerManager object.

getControllerManager() : \Ascmvc\AbstractControllerManager
abstract

Gets the Controller's output.

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

Response

\Zend\Diactoros\Response|array|string|null

Gets the AscmvcEvent object.

getEvent() : \Ascmvc\Mvc\AscmvcEvent
abstract

Gets the AscmvcEventManager object.

getEventManager() : \Ascmvc\Mvc\AscmvcEventManager
abstract

Static method : returns the Singleton instance of this class.

getInstance() : \Ascmvc\AbstractApp
static

Gets the ServerRequestInterface object.

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

Response

\Psr\Http\Message\ServerRequestInterface

Gets the Response object.

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

Response

\Psr\Http\Message\ResponseInterface

Gets the AbstractRouter object.

getRouter() : \Ascmvc\AbstractRouter
abstract

Gets the Pimple\Container object.

getServiceManager() : \Pimple\Container
abstract

Response

\Pimple\Container

Gets the Template Manager object.

getViewObject() : \League\Plates\Engine|\Smarty|\Twig_Environment
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
abstract

Arguments

$baseConfig

array

Response

\Ascmvc\AbstractApp

Renders the response.

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

Arguments

$controllerOutput

\Zend\Diactoros\Response|array|string

Response

\Zend\Diactoros\Response

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

run() : void
abstract

Sets the AbstractController object.

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

Arguments

Response

\Ascmvc\AbstractApp

Sets the AbstractControllerManager object.

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

Arguments

Response

\Ascmvc\AbstractApp

Sets the Controller's output.

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

Arguments

$controllerOutput

array

Response

\Ascmvc\AbstractApp

Sets the AscmvcEvent object.

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

Arguments

Response

\Ascmvc\AbstractApp

Sets the AscmvcEventManager object.

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

Arguments

Response

\Ascmvc\AbstractApp

Sets the ServerRequestInterface object.

setRequest(\Psr\Http\Message\ServerRequestInterface $request) : \Psr\Http\Message\ServerRequestInterface
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
abstract

Arguments

$response

\Psr\Http\Message\ResponseInterface

Response

\Psr\Http\Message\ResponseInterface

Sets the AbstractRouter object.

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

Arguments

Response

\Ascmvc\AbstractApp

Sets the Pimple\Container object.

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

Arguments

$serviceManager

\Pimple\Container

Response

\Ascmvc\AbstractApp

Sets the Template Manager object.

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

Arguments

$viewObject

Response

\Ascmvc\AbstractApp

Properties

Contains the Singleton instance of this class.

appInstance : \Ascmvc\AbstractApp|null
static
var

Type(s)

\Ascmvc\AbstractApp|null

Array contains all of the AbstractApp's basic configurations.

baseConfig : array|null
var

Type(s)

array|null

Contains a reference to a Request instance.

request : \Zend\Diactoros\Request|null
var

Type(s)

\Zend\Diactoros\Request|null

Contains a reference to a Response instance.

response : \Zend\Diactoros\Response|null
var

Type(s)

\Zend\Diactoros\Response|null

Contains a reference to a \Pimple\Container instance.

serviceManager : \Pimple\Container|null
var

Type(s)

\Pimple\Container|null

Contains a reference to the AscmvcEventManager instance.

eventManager : \Ascmvc\Mvc\AscmvcEventManager|null

Contains a reference to the AscmvcEvent instance.

event : \Ascmvc\Mvc\AscmvcEvent|null
var

Type(s)

\Ascmvc\Mvc\AscmvcEvent|null

Contains a reference to a Template Manager instance.

viewObject : Object|null
var

Type(s)

Object|null

Contains a reference to an AbstractRouter instance.

router : \Ascmvc\AbstractRouter|null
var

Type(s)

\Ascmvc\AbstractRouter|null

Contains a reference to a AbstractControllerManager instance.

controllerManager : \Ascmvc\AbstractControllerManager|null

Contains a reference to a AbstractController instance.

controller : \Ascmvc\AbstractController|null
var

Type(s)

\Ascmvc\AbstractController|null

Contains the controller's output.

controllerOutput : \Zend\Diactoros\Response|array|string|null
var

Type(s)

\Zend\Diactoros\Response|array|string|null