You are here

class SubRequestResponse in GraphQL 8.3

Hierarchy

Expanded class hierarchy of SubRequestResponse

2 files declare their use of SubRequestResponse
SubRequestBuffer.php in src/GraphQL/Buffers/SubRequestBuffer.php
SubrequestExtractionController.php in src/Controller/SubrequestExtractionController.php

File

src/GraphQL/Buffers/SubRequestResponse.php, line 9

Namespace

Drupal\graphql\GraphQL\Buffers
View source
class SubRequestResponse extends Response implements RefinableCacheableDependencyInterface {
  use RefinableCacheableDependencyTrait;

  /**
   * The request result.
   *
   * @var array
   */
  protected $result;

  /**
   * SubrequestResponse constructor.
   *
   * @param array $result
   *   The request result.
   * @param int $status
   *   The response status code.
   * @param array $headers
   *   An array of response headers.
   */
  public function __construct(array $result, $status = 200, array $headers = []) {
    parent::__construct('', $status, $headers);
    $this->result = $result;
  }

  /**
   * Gets the request result.
   *
   * @return array
   *   The request result.
   */
  public function getResult() {
    return $this->result;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
CacheableDependencyTrait::$cacheContexts protected property Cache contexts.
CacheableDependencyTrait::$cacheMaxAge protected property Cache max-age.
CacheableDependencyTrait::$cacheTags protected property Cache tags.
CacheableDependencyTrait::getCacheContexts public function 3
CacheableDependencyTrait::getCacheMaxAge public function 3
CacheableDependencyTrait::getCacheTags public function 3
CacheableDependencyTrait::setCacheability protected function Sets cacheability; useful for value object constructors.
RefinableCacheableDependencyTrait::addCacheableDependency public function 1
RefinableCacheableDependencyTrait::addCacheContexts public function
RefinableCacheableDependencyTrait::addCacheTags public function
RefinableCacheableDependencyTrait::mergeCacheMaxAge public function
SubRequestResponse::$result protected property The request result.
SubRequestResponse::getResult public function Gets the request result.
SubRequestResponse::__construct public function SubrequestResponse constructor.