Constants

START_WORDPRESS

START_WORDPRESS

Event name that will start after wordpress initialize

FINISH_WORDPRESS

FINISH_WORDPRESS

Event name that will start before WordPress finishes

BEFORE_PAGE

BEFORE_PAGE

Event name that will start before running the page

AFTER_PAGE

AFTER_PAGE

Event name that will start after running the page

FINISH_PAGE

FINISH_PAGE

Event name that will start before finishes the page, even with the exception

EXCEPTION_PAGE

EXCEPTION_PAGE

Event name that will start after the page launches an exception

BEFORE_SHORTCODE

BEFORE_SHORTCODE

Event name that will start before running the shortcode

AFTER_SHORTCODE

AFTER_SHORTCODE

Event name that will start after running the shortcode

BEFORE_ACTION

BEFORE_ACTION

Event name that will start before running the action

AFTER_ACTION

AFTER_ACTION

Event name that will start after running the action

FINISH_ACTION

FINISH_ACTION

Event name that will start before finishes the action, even with the exception

EXCEPTION_ACTION

EXCEPTION_ACTION

Event name that will start after the action launches an exception

Properties

Methods

getInstance()

getInstance() : static

The singleton pattern is useful when we need to make sure that we only have a single instance of a class for the entire request lifecycle in a Web application. This usually occurs when we have global objects (such as a configuration class) or a resource (Such as an event queue).

Returns

static

__clone()

__clone() 

Clone Not allowed

Throws

\MocaBonita\tools\MbException

__wakeup()

__wakeup() 

WakeUp Not allowed.

Throws

\MocaBonita\tools\MbException

callEvents()

callEvents(\MocaBonita\MocaBonita  $mocaBonita, string  $dispatch, object  $complement = null) : void

Call page events

Parameters

\MocaBonita\MocaBonita $mocaBonita
string $dispatch
object $complement

exceptionPageDispatcher()

exceptionPageDispatcher(\MocaBonita\tools\MbRequest  $mbRequest, \MocaBonita\tools\MbResponse  $mbResponse, \Exception  $exception) 

Event that will start after the page launches an exception

Parameters

\MocaBonita\tools\MbRequest $mbRequest
\MocaBonita\tools\MbResponse $mbResponse
\Exception $exception

Throws

\MocaBonita\tools\MbException

finishActionDispatcher()

finishActionDispatcher(\MocaBonita\tools\MbRequest  $mbRequest, \MocaBonita\tools\MbResponse  $mbResponse, \MocaBonita\tools\MbAction  $mbAction) 

Event that will start before finishes the action, even with the exception

Parameters

\MocaBonita\tools\MbRequest $mbRequest
\MocaBonita\tools\MbResponse $mbResponse
\MocaBonita\tools\MbAction $mbAction

Throws

\MocaBonita\tools\MbException

exceptionActionDispatcher()

exceptionActionDispatcher(\MocaBonita\tools\MbRequest  $mbRequest, \MocaBonita\tools\MbResponse  $mbResponse, \Exception  $exception) 

Event that will start after the action launches an exception

Parameters

\MocaBonita\tools\MbRequest $mbRequest
\MocaBonita\tools\MbResponse $mbResponse
\Exception $exception

Throws

\MocaBonita\tools\MbException

__construct()

__construct() 

Singleton construct

init()

init() 

Method to be started