You are here

class Subrequest in Subrequests 8.2

Same name and namespace in other branches
  1. 3.x src/Subrequest.php \Drupal\subrequests\Subrequest

Value object containing a Subrequest.

Hierarchy

Expanded class hierarchy of Subrequest

7 files declare their use of Subrequest
JsonBlueprintDenormalizer.php in src/Normalizer/JsonBlueprintDenormalizer.php
JsonBlueprintDenormalizerTest.php in tests/src/Unit/Normalizer/JsonBlueprintDenormalizerTest.php
JsonPathReplacerTest.php in tests/src/Unit/JsonPathReplacerTest.php
JsonSubrequestDenormalizer.php in src/Normalizer/JsonSubrequestDenormalizer.php
JsonSubrequestDenormalizerTest.php in tests/src/Unit/Normalizer/JsonSubrequestDenormalizerTest.php

... See full list

File

src/Subrequest.php, line 8

Namespace

Drupal\subrequests
View source
class Subrequest {

  /**
   * The request ID.
   *
   * @var string
   */
  public $requestId;

  /**
   * The parsed JSON.
   *
   * @var array
   */
  public $body;

  /**
   * Array of key values.
   *
   * @var array
   */
  public $headers;

  /**
   * The parent subrequests.
   *
   * @var string[]
   */
  public $waitFor;

  /**
   * Is the subrequest resolved?
   *
   * @var bool
   */
  public $_resolved;

  /**
   * The URI to request.
   *
   * @var string
   */
  public $uri;

  /**
   * The action to perform.
   *
   * @var string
   */
  public $action;
  public function __construct($values) {
    $this->requestId = $values['requestId'];
    $this->body = $values['body'];
    $this->headers = $values['headers'];
    $this->waitFor = $values['waitFor'];
    $this->_resolved = $values['_resolved'];
    $this->uri = $values['uri'];
    $this->action = $values['action'];
  }
  public function __toString() {
    return serialize($this);
  }

}

Members

Namesort descending Modifiers Type Description Overrides
Subrequest::$action public property The action to perform.
Subrequest::$body public property The parsed JSON.
Subrequest::$headers public property Array of key values.
Subrequest::$requestId public property The request ID.
Subrequest::$uri public property The URI to request.
Subrequest::$waitFor public property The parent subrequests.
Subrequest::$_resolved public property Is the subrequest resolved?
Subrequest::__construct public function
Subrequest::__toString public function