You are here

class GoneException in RESTful 7.2

Hierarchy

Expanded class hierarchy of GoneException

2 files declare their use of GoneException
Resource.php in src/Plugin/resource/Resource.php
Contains \Drupal\restful\Plugin\resource\Resource.
ResourceInterface.php in src/Plugin/resource/ResourceInterface.php
Contains \Drupal\restful\Plugin\resource\ResourceInterface.

File

src/Exception/GoneException.php, line 10
Contains \Drupal\restful\Exception\GoneException.

Namespace

Drupal\restful\Exception
View source
class GoneException extends RestfulException {

  /**
   * Defines the HTTP error code.
   *
   * @var int
   */
  protected $code = 410;

  /**
   * {@inheritdoc}
   */
  protected $description = 'The resource at this end point is no longer available.';

  /**
   * {@inheritdoc}
   */
  protected $instance = 'help/restful/problem-instances-gone';

}

Members

Namesort descending Modifiers Type Description Overrides
GoneException::$code protected property Defines the HTTP error code.
GoneException::$description protected property Exception description. Overrides RestfulException::$description
GoneException::$instance protected property Defines the instance resource. Overrides RestfulException::$instance
RestfulException::$fieldErrors protected property Array keyed by the field name, and array of error messages as value.
RestfulException::$headers protected property Array of extra headers to set when throwing an exception.
RestfulException::addFieldError public function Add an error per field.
RestfulException::getDescription final public function Gets the description of the exception.
RestfulException::getFieldErrors public function Return an array with all the errors.
RestfulException::getHeaders public function Get the associative array of headers.
RestfulException::getInstance public function Get the URL to the error for the particular case.
RestfulException::getType public function Return a string to the common problem type.
RestfulException::setHeader public function Set a header.