/** * Init integrations with JSON API implementation. * * @return void */ protected function initJsonApiSupport() { $this->parametersFactory = new ParametersFactory(); // integrations with framework $this->responses = new Responses($this->getIntegration()); $this->exceptionThrower = new ExceptionThrower(); // init support from json-api implementation $this->initCodecMatcher(); $this->parametersParser = $this->parametersFactory->createParametersParser(); $this->supportedExtensions = $this->parametersFactory->createSupportedExtensions($this->extensions); $this->parametersChecker = new RestrictiveParameterChecker($this->exceptionThrower, $this->codecMatcher, $this->allowUnrecognizedParams, $this->allowedIncludePaths, $this->allowedFieldSetTypes, $this->allowedSortFields, $this->allowedPagingParameters, $this->allowedFilteringParameters, $this->allowExtensionsSupport); // information about extensions supported by the current controller might be used in exception handler $this->getIntegration()->declareSupportedExtensions($this->getSupportedExtensions()); }