\MocaBonita\toolsMbException

Main class of the MocaBonita Exception

Summary

Methods
Properties
Constants
getData()
setData()
getMessages()
setMessages()
__construct()
registerError()
No public properties found
No constants found
No protected methods found
$messages
$data
N/A
No private methods found
No private properties found
N/A

Properties

$messages

$messages : array<mixed,string>

Stored wperror

Type

array<mixed,string>

$data

$data : null|array|\Illuminate\Contracts\Support\Arrayable

Stored exception data

Type

null|array|\Illuminate\Contracts\Support\Arrayable

Methods

getData()

getData() : array|string

Get exception data

Returns

array|string

setData()

setData(array|\Illuminate\Contracts\Support\Arrayable|\Illuminate\Contracts\View\View  $data) : \MocaBonita\tools\MbException

Set exception data

Parameters

array|\Illuminate\Contracts\Support\Arrayable|\Illuminate\Contracts\View\View $data

Returns

\MocaBonita\tools\MbException

getMessages()

getMessages() : array<mixed,string>|string

Returns

array<mixed,string>|string

__construct()

__construct(string  $msg, integer  $code = 400, null|array|\MocaBonita\view\MbView|\Illuminate\Contracts\Support\Arrayable  $dados = null, \WP_Error  $messages = null) 

PHP 5 allows developers to declare constructor methods for classes.

Classes which have a constructor method call this method on each newly-created object, so it is suitable for any initialization that the object may need before it is used.

Note: Parent constructors are not called implicitly if the child class defines a constructor. In order to run a parent constructor, a call to parent::__construct() within the child constructor is required.

Parameters

string $msg
integer $code
null|array|\MocaBonita\view\MbView|\Illuminate\Contracts\Support\Arrayable $dados
\WP_Error $messages

registerError()

registerError(\Exception  $e) 

Post an error notice on the dashboard and save

Parameters

\Exception $e