Drupal 8.0.0 beta 12. More info: https://www.drupal.org/node/2514176

This commit is contained in:
Pantheon Automation 2015-08-17 17:00:26 -07:00 committed by Greg Anderson
commit 9921556621
13277 changed files with 1459781 additions and 0 deletions

View file

@ -0,0 +1,13 @@
<?php
/**
* @file
* Contains \Drupal\Component\Plugin\Exception\ContextException.
*/
namespace Drupal\Component\Plugin\Exception;
/**
* An exception class to be thrown for context plugin exceptions.
*/
class ContextException extends \Exception implements ExceptionInterface { }

View file

@ -0,0 +1,12 @@
<?php
/**
* @file
* Contains \Drupal\Component\Plugin\Exception\ExceptionInterface.
*/
namespace Drupal\Component\Plugin\Exception;
/**
* Exception interface for all exceptions thrown by the Plugin component.
*/
interface ExceptionInterface { }

View file

@ -0,0 +1,17 @@
<?php
/**
* @file
* Contains \Drupal\Component\Plugin\Exception\InvalidDecoratedMethod.
*/
namespace Drupal\Component\Plugin\Exception;
use Drupal\Component\Plugin\Exception\ExceptionInterface;
use \BadMethodCallException;
/**
* Exception thrown when a decorator's _call() method is triggered, but the
* decorated object does not contain the requested method.
*
*/
class InvalidDecoratedMethod extends BadMethodCallException implements ExceptionInterface { }

View file

@ -0,0 +1,12 @@
<?php
/**
* @file
* Contains \Drupal\Component\Plugin\Exception\InvalidDeriverException.
*/
namespace Drupal\Component\Plugin\Exception;
/**
* Exception to be thrown if a plugin tries to use an invalid deriver.
*/
class InvalidDeriverException extends PluginException { }

View file

@ -0,0 +1,45 @@
<?php
/**
* @file
* Contains \Drupal\Component\Plugin\Exception\InvalidPluginDefinitionException.
*/
namespace Drupal\Component\Plugin\Exception;
/**
* Defines a class for invalid plugin definition exceptions.
*/
class InvalidPluginDefinitionException extends PluginException {
/**
* The plugin ID of the mapper.
*
* @var string
*/
protected $pluginId;
/**
* Constructs a InvalidPluginDefinitionException.
*
* @param string $plugin_id
* The plugin ID of the mapper.
*
* @see \Exception for the remaining parameters.
*/
public function __construct($plugin_id, $message = '', $code = 0, \Exception $previous = NULL) {
$this->pluginId = $plugin_id;
parent::__construct($message, $code, $previous);
}
/**
* Gets the plugin ID of the mapper that raised the exception.
*
* @return string
* The plugin ID.
*/
public function getPluginId() {
return $this->pluginId;
}
}

View file

@ -0,0 +1,15 @@
<?php
/**
* @file
* Contains \Drupal\Component\Plugin\Exception\MapperExceptionInterface.
*
* Base exception interface for grouping mapper exceptions.
*/
namespace Drupal\Component\Plugin\Exception;
/**
* Extended interface for exceptions thrown specifically by the Mapper subsystem
* within the Plugin component.
*/
interface MapperExceptionInterface extends ExceptionInterface { }

View file

@ -0,0 +1,13 @@
<?php
/**
* @file
* Contains \Drupal\Component\Plugin\Exception\PluginException.
*/
namespace Drupal\Component\Plugin\Exception;
/**
* Generic Plugin exception class to be thrown when no more specific class
* is applicable.
*/
class PluginException extends \Exception implements ExceptionInterface { }

View file

@ -0,0 +1,30 @@
<?php
/**
* @file
* Contains \Drupal\Component\Plugin\Exception\PluginNotFoundException.
*/
namespace Drupal\Component\Plugin\Exception;
/**
* Plugin exception class to be thrown when a plugin ID could not be found.
*/
class PluginNotFoundException extends PluginException {
/**
* Construct an PluginNotFoundException exception.
*
* @param string $plugin_id
* The plugin ID that was not found.
*
* @see \Exception for remaining parameters.
*/
public function __construct($plugin_id, $message = '', $code = 0, \Exception $previous = NULL) {
if (empty($message)) {
$message = sprintf("Plugin ID '%s' was not found.", $plugin_id);
}
parent::__construct($message, $code, $previous);
}
}