You are here

public function ResourceResponseValidator::__construct in Drupal 9

Same name and namespace in other branches
  1. 8 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;
}