You are here

interface FileLinkInterface in File Link 8

Same name and namespace in other branches
  1. 2.0.x src/FileLinkInterface.php \Drupal\file_link\FileLinkInterface

Provides an interface for File Link field.

Hierarchy

Expanded class hierarchy of FileLinkInterface

All classes that implement FileLinkInterface

1 file declares its use of FileLinkInterface
FileLinkItem.php in src/Plugin/Field/FieldType/FileLinkItem.php

File

src/FileLinkInterface.php, line 11

Namespace

Drupal\file_link
View source
interface FileLinkInterface {

  /**
   * Get raw file size.
   *
   * @return int
   *   File size in bytes.
   */
  public function getSize();

  /**
   * Get file format.
   *
   * @return string
   *   File format.
   */
  public function getFormat();

  /**
   * Sets the latest HTTP response.
   *
   * @param \Psr\Http\Message\ResponseInterface $response
   *   The last response to be stored.
   *
   * @return $this
   */
  public function setResponse(ResponseInterface $response);

  /**
   * Gets the latest stored HTTP response.
   *
   * @return \Psr\Http\Message\ResponseInterface
   *   A response object.
   */
  public function getResponse();

  /**
   * Clears a previous stored HTTP response.
   *
   * @return $this
   */
  public function clearResponse();

  /**
   * Sets the exception throw by the last HTTP client request.
   *
   * @param \GuzzleHttp\Exception\RequestException $exception
   *   The last Guzzle request exception.
   *
   * @return $this
   */
  public function setException(RequestException $exception);

  /**
   * Gets the last Guzzle client exception.
   *
   * @return \GuzzleHttp\Exception\RequestException
   *   The last Guzzle client exception.
   */
  public function getException();

  /**
   * Clears a previous stored Guzzle exception.
   *
   * @return $this
   */
  public function clearException();

}

Members

Namesort descending Modifiers Type Description Overrides
FileLinkInterface::clearException public function Clears a previous stored Guzzle exception. 1
FileLinkInterface::clearResponse public function Clears a previous stored HTTP response. 1
FileLinkInterface::getException public function Gets the last Guzzle client exception. 1
FileLinkInterface::getFormat public function Get file format. 1
FileLinkInterface::getResponse public function Gets the latest stored HTTP response. 1
FileLinkInterface::getSize public function Get raw file size. 1
FileLinkInterface::setException public function Sets the exception throw by the last HTTP client request. 1
FileLinkInterface::setResponse public function Sets the latest HTTP response. 1