function ResourceResponseValidator::__construct

Same name in other branches
  1. 8.9.x core/modules/jsonapi/src/EventSubscriber/ResourceResponseValidator.php \Drupal\jsonapi\EventSubscriber\ResourceResponseValidator::__construct()
  2. 10 core/modules/jsonapi/src/EventSubscriber/ResourceResponseValidator.php \Drupal\jsonapi\EventSubscriber\ResourceResponseValidator::__construct()
  3. 11.x core/modules/jsonapi/src/EventSubscriber/ResourceResponseValidator.php \Drupal\jsonapi\EventSubscriber\ResourceResponseValidator::__construct()

Constructs a ResourceResponseValidator object.

Parameters

\Psr\Log\LoggerInterface $logger: The JSON:API logger channel.

\Drupal\Core\Extension\ModuleHandlerInterface $module_handler: The module handler.

string $app_root: The application's root file path.

File

core/modules/jsonapi/src/EventSubscriber/ResourceResponseValidator.php, line 70

Class

ResourceResponseValidator
Response subscriber that validates a JSON:API response.

Namespace

Drupal\jsonapi\EventSubscriber

Code

public function __construct(LoggerInterface $logger, ModuleHandlerInterface $module_handler, $app_root) {
    $this->logger = $logger;
    $this->moduleHandler = $module_handler;
    $this->appRoot = $app_root;
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.