You are here

public function ResourceResponseValidator::__construct in JSON:API 8

Same name and namespace in other branches
  1. 8.2 src/EventSubscriber/ResourceResponseValidator.php \Drupal\jsonapi\EventSubscriber\ResourceResponseValidator::__construct()

Constructs a ResourceResponseValidator object.

Parameters

\Symfony\Component\Serializer\SerializerInterface $serializer: The serializer.

\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

src/EventSubscriber/ResourceResponseValidator.php, line 88

Class

ResourceResponseValidator
Response subscriber that validates a JSON API response.

Namespace

Drupal\jsonapi\EventSubscriber

Code

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