PluginProbe
MainWP Dashboard: Self-hosted WordPress Management for Agencies / 4.1
MainWP Dashboard: Self-hosted WordPress Management for Agencies v4.1
6.2 6.1.8 6.1.7 6.1.6 6.1.5 6.1.4 6.1.3 6.1.2 6.1.1 6.1 6.0.12 6.0.11 4.6.0.1 5.0 5.0.1 5.0.2 5.0.3 5.0.3.1 5.0.3.2 5.1 5.1.1 5.2 5.2.1 5.2.2 5.3 All 153 releases
mainwp / class / class-mainwp-exception.php

class-mainwp-exception.php in MainWP Dashboard: Self-hosted WordPress Management for Agencies 4.1, at class/class-mainwp-exception.php

51 lines 913 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /**
3 * Extends MainWP Exception
4 *
5 * Grabs $extra and stores it in $messageExtra.
6 *
7 * @package MainWP/Dashboard
8 */
9
10 namespace MainWP\Dashboard;
11
12 /**
13 * Class MainWP_Exception
14 *
15 * @package MainWP\Dashboard
16 */
17 class MainWP_Exception extends \Exception {
18
19
20 /**
21 * Protected variable to hold the extra messages.
22 *
23 * @var string Error messages.
24 */
25 protected $messageExtra;
26
27
28 /**
29 * MainWP_Exception constructor.
30 *
31 * Grab Exception Message upon creation of the object.
32 *
33 * @param mixed $message Exception message.
34 * @param null $extra Any HTTP Errors.
35 */
36 public function __construct( $message, $extra = null ) {
37 parent::__construct( $message );
38 $this->messageExtra = esc_html( $extra ); // add more secure.
39 }
40
41 /**
42 * Method get_message_extra()
43 *
44 * @return $messageExtra Extra messages.
45 */
46 public function get_message_extra() {
47 return $this->messageExtra;
48 }
49
50 }
51