You are here

public function ParameterFactoryBase::getInputValidator in JSON-RPC 8

Same name and namespace in other branches
  1. 2.x src/ParameterFactory/ParameterFactoryBase.php \Drupal\jsonrpc\ParameterFactory\ParameterFactoryBase::getInputValidator()
2 calls to ParameterFactoryBase::getInputValidator()
PaginationParameterFactory::getOutputValidator in src/ParameterFactory/PaginationParameterFactory.php
RawParameterFactory::getOutputValidator in src/ParameterFactory/RawParameterFactory.php

File

src/ParameterFactory/ParameterFactoryBase.php, line 62

Class

ParameterFactoryBase
Base class for parameter factories.

Namespace

Drupal\jsonrpc\ParameterFactory

Code

public function getInputValidator() {
  if (!$this->inputValidator) {
    $schema = $this->definition
      ->getSchema();
    $this->inputValidator = new JsonSchemaValidator($schema, $this->validator, Constraint::CHECK_MODE_TYPE_CAST);
  }
  return $this->inputValidator;
}