Elgg
Version 4.3
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
17
public
function
__construct
(
string
$message
=
''
,
int
$code
= 0, \Throwable $previous = null) {
18
if
(!
$message
) {
19
$message
=
elgg_echo
(
'ElggPlugin:Error'
);
20
}
21
22
parent::__construct(
$message
,
$code
, $previous);
23
}
24
36
public
static
function
factory
(array
$options
= []): self {
37
$message
=
$options
[
'message'
] ??
''
;
38
$code
=
$options
[
'code'
] ?? 0;
39
$previous =
$options
[
'previous'
] ?? null;
40
41
$exception
=
new
static
(
$message
,
$code
, $previous);
42
43
$plugin
=
$options
[
'plugin'
] ?? null;
44
if
(
$plugin
instanceof \
ElggPlugin
) {
45
$exception
->plugin =
$plugin
;
46
}
47
48
return
$exception
;
49
}
50
}
$plugin
$plugin
Definition:
set_priority.php:16
$message
$message
Definition:
set_maintenance_mode.php:7
ElggPlugin
elgg_echo
elgg_echo($message_key, array $args=[], $language="")
Elgg language module Functions to manage language and translations.
Definition:
languages.php:18
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:36
Elgg\Exceptions\PluginException\__construct
__construct(string $message= '', int $code=0,\Throwable $previous=null)
{}
Definition:
PluginException.php:17
$exception
$exception
Definition:
error.php:15
Elgg\Exceptions
Definition:
AuthenticationException.php:3
Exception
Generated on Fri Aug 12 2022 00:00:22 for Elgg by
1.8.11