VERSION
VERSION
Current version of MocaBonita.
Main class of the MocaBonita framework
$instances : array<mixed,\MocaBonita\tools\MbSingleton>
Stores instances of classes
$mbRequest : \MocaBonita\tools\MbRequest
Stores the current MbRequest of the request
$mbResponse : \MocaBonita\tools\MbResponse
Stores the current MbResponse of the response
$mbAudit : \MocaBonita\audit\MbAudit
Stores the current audit
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).
getMbAssets(boolean $wordpress = false) : \MocaBonita\tools\MbAsset
Get either MbAsset from the plugin or from Wordpress
boolean | $wordpress | If it's true, then it'll return the wordpress' MbAsset. If it's false, then it'll return the plugin's MbAsset. |
getAssetsPlugin() : \MocaBonita\tools\MbAsset
Get the plugin's MbAsset
getAssetsWordpress() : \MocaBonita\tools\MbAsset
Get the Wordpress' MbAsset
setMbAssets(\MocaBonita\tools\MbAsset $mbAsset, boolean $wordpress = false) : \MocaBonita\MocaBonita
Set either MbAsset to the plugin or to the Wordpress
\MocaBonita\tools\MbAsset | $mbAsset | |
boolean | $wordpress | If it's true, then it'll set MbAssets to the Wordpress. If it's false, then it'll set MbAssets to the plugin. |
current instance of MocaBonita
setAssetsPlugin(\MocaBonita\tools\MbAsset $pluginMbAsset) : \MocaBonita\MocaBonita
Set the MbAsset to the plugin
\MocaBonita\tools\MbAsset | $pluginMbAsset |
current instance of MocaBonita
setAssetsWordpress(\MocaBonita\tools\MbAsset $wordpressMbAsset) : \MocaBonita\MocaBonita
Set the MbAsset to the Wordpress
\MocaBonita\tools\MbAsset | $wordpressMbAsset |
current instance of MocaBonita
getMbEvents(string|null $dispatch = null) : \Illuminate\Support\Collection
Get either a MbEvent from a dispatcher type or the MbEvent list
string|null | $dispatch | If it's a string, then it'll return either an array of MbEvent or an empty array. If it's null, then it'll return all stored MbEvent |
setMbEvent(\MocaBonita\tools\MbEvent $mbEvent, string|array $dispatch) : \MocaBonita\MocaBonita
Set a MbEvent to a dispatcher type
\MocaBonita\tools\MbEvent | $mbEvent | |
string|array | $dispatch | name of dispatcher |
current instance of MocaBonita
setPage(string $page) : \MocaBonita\MocaBonita
Set the current name of the wordpress page
string | $page |
current instance of MocaBonita
setAction(string $action) : \MocaBonita\MocaBonita
Set the current name of the wordpress action
string | $action |
current instance of MocaBonita
getMbAudit() : \MocaBonita\audit\MbAudit
setMbAudit(\MocaBonita\audit\MbAudit $mbAudit) : \MocaBonita\MocaBonita
\MocaBonita\audit\MbAudit | $mbAudit |
enableSession(\Symfony\Component\HttpFoundation\Session\Session $session = null) : \MocaBonita\MocaBonita
Enable session
\Symfony\Component\HttpFoundation\Session\Session | $session |
enableFlash(\Symfony\Component\HttpFoundation\Session\Session $session = null) : \MocaBonita\MocaBonita
Enable flash session
\Symfony\Component\HttpFoundation\Session\Session | $session |
runAction(\MocaBonita\tools\MbAction $mbAction, \MocaBonita\view\MbView $mbView, array $callbackParameters = array()) : mixed
\MocaBonita\tools\MbAction | $mbAction | |
\MocaBonita\view\MbView | $mbView | |
array | $callbackParameters |
getMbPage(string $slugPage) : \MocaBonita\tools\MbPage
Get MbPage of slug
string | $slugPage | slug of the MbPage |
getMbShortcode(string $shortcodeName) : \MocaBonita\tools\MbShortCode
Get MbShortcode of name
string | $shortcodeName | Name of shortcode |
addMbPageStructure( $pageName, \MocaBonita\tools\MbPageStructure $mbPageStructure)
Add page structure
$pageName | ||
\MocaBonita\tools\MbPageStructure | $mbPageStructure |
addMbPage(\MocaBonita\tools\MbPage $mbPage) : \MocaBonita\MocaBonita
Add a MbPage to MocaBonita as main menu
\MocaBonita\tools\MbPage | $mbPage |
current instance of MocaBonita
addSubMbPage(\MocaBonita\tools\MbPage $mbPage) : \MocaBonita\MocaBonita
Add a MbPage to MocaBonita as submenu
\MocaBonita\tools\MbPage | $mbPage |
current instance of MocaBonita
addMbShortcode(string $name, \MocaBonita\tools\MbPage $mbPage, string|callable|mixed $method) : \MocaBonita\tools\MbShortCode
Add a MbShortCode to MocaBonita
string | $name | |
\MocaBonita\tools\MbPage | $mbPage | |
string|callable|mixed | $method |
getMbRequest() : \MocaBonita\tools\MbRequest
Get MbRequest
setMbRequest(\MocaBonita\tools\MbRequest $mbRequest) : \MocaBonita\MocaBonita
Set MbRequest to MocaBonita
\MocaBonita\tools\MbRequest | $mbRequest |
current instance of MocaBonita
getMbResponse() : \MocaBonita\tools\MbResponse
Get MbResponse
setMbResponse(\MocaBonita\tools\MbResponse $mbResponse) : \MocaBonita\MocaBonita
Set MbResponse to MocaBonita
\MocaBonita\tools\MbResponse | $mbResponse |
current instance of MocaBonita
runCurrentPage(\MocaBonita\tools\MbPage $mbPage)
Execute current page resources
\MocaBonita\tools\MbPage | $mbPage |