Elgg
Version 5.0
Main Page
Related Pages
Namespaces
Classes
Files
Examples
File List
File Members
engine
classes
Elgg
Exceptions
PluginException.php
Go to the documentation of this file.
1
<?php
2
3
namespace
Elgg\Exceptions
;
4
12
class
PluginException
extends
Exception
{
13
14
public \ElggPlugin
$plugin
;
15
19
public
function
__construct
(
string
$message
=
''
,
int
$code
= 0, \Throwable $previous = null) {
20
if
(!
$message
) {
21
$message
=
elgg_echo
(
'ElggPlugin:Error'
);
22
}
23
24
parent::__construct(
$message
,
$code
, $previous);
25
}
26
38
public
static
function
factory
(array
$options
= []): self {
39
$message
=
$options
[
'message'
] ??
''
;
40
$code
=
$options
[
'code'
] ?? 0;
41
$previous =
$options
[
'previous'
] ?? null;
42
43
$exception
=
new
static
(
$message
,
$code
, $previous);
44
45
$plugin =
$options
[
'plugin'
] ?? null;
46
if
($plugin instanceof \
ElggPlugin
) {
47
$exception
->plugin =
$plugin
;
48
}
49
50
return
$exception
;
51
}
52
}
$message
$message
Definition:
set_maintenance_mode.php:7
elgg_echo
elgg_echo(string $message_key, array $args=[], string $language= '')
Elgg language module Functions to manage language and translations.
Definition:
languages.php:17
ElggPlugin
Elgg\Exceptions\PluginException
Definition:
PluginException.php:12
$options
$options
Elgg admin footer.
Definition:
footer.php:6
$code
$code
Definition:
changepassword.php:12
Elgg\Exceptions\PluginException\factory
static factory(array $options=[])
Create a new instance of a PluginException.
Definition:
PluginException.php:38
Elgg\Exceptions\PluginException\__construct
__construct(string $message= '', int $code=0,\Throwable $previous=null)
{}
Definition:
PluginException.php:19
$exception
$exception
Definition:
error.php:15
Elgg\Exceptions\PluginException\$plugin
ElggPlugin $plugin
Definition:
PluginException.php:14
Elgg\Exceptions
Definition:
AuthenticationException.php:3
Exception
Generated on Sun Sep 24 2023 00:00:22 for Elgg by
1.8.11