Mercurial > hg > isophonics-drupal-site
comparison core/lib/Drupal/Component/Plugin/Exception/InvalidPluginDefinitionException.php @ 0:4c8ae668cc8c
Initial import (non-working)
author | Chris Cannam |
---|---|
date | Wed, 29 Nov 2017 16:09:58 +0000 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
-1:000000000000 | 0:4c8ae668cc8c |
---|---|
1 <?php | |
2 | |
3 namespace Drupal\Component\Plugin\Exception; | |
4 | |
5 /** | |
6 * Defines a class for invalid plugin definition exceptions. | |
7 */ | |
8 class InvalidPluginDefinitionException extends PluginException { | |
9 | |
10 /** | |
11 * The plugin ID of the mapper. | |
12 * | |
13 * @var string | |
14 */ | |
15 protected $pluginId; | |
16 | |
17 /** | |
18 * Constructs a InvalidPluginDefinitionException. | |
19 * | |
20 * For the remaining parameters see \Exception. | |
21 * | |
22 * @param string $plugin_id | |
23 * The plugin ID of the mapper. | |
24 * | |
25 * @see \Exception | |
26 */ | |
27 public function __construct($plugin_id, $message = '', $code = 0, \Exception $previous = NULL) { | |
28 $this->pluginId = $plugin_id; | |
29 parent::__construct($message, $code, $previous); | |
30 } | |
31 | |
32 /** | |
33 * Gets the plugin ID of the mapper that raised the exception. | |
34 * | |
35 * @return string | |
36 * The plugin ID. | |
37 */ | |
38 public function getPluginId() { | |
39 return $this->pluginId; | |
40 } | |
41 | |
42 } |