/** * Constructor. * * @param string $context */ public function __construct($context) { $factory = new Factory(); $factory->setConstraintClass('request body', SchemaConstraint::class); $factory->setConstraintClass('response body', SchemaConstraint::class); $this->validator = $factory->createInstanceFor($context); $this->context = $context; }
/** * Get the type check based on the set check mode. * * @return TypeCheck\TypeCheckInterface */ protected function getTypeCheck() { return $this->factory->getTypeCheck(); }