/**
  * @return CodecMatcherInterface
  */
 protected function getCodecMatcher()
 {
     if ($this->codecMatcher === null) {
         $this->codecMatcher = $this->integration->getFromContainer(CodecMatcherInterface::class);
     }
     return $this->codecMatcher;
 }
示例#2
0
 /**
  * Init integrations with JSON API implementation.
  *
  * @param IntegrationInterface $integration
  *
  * @return void
  */
 private function initJsonApiSupport(IntegrationInterface $integration)
 {
     $this->integration = $integration;
     /** @var FactoryInterface $factory */
     $factory = $this->getIntegration()->getFromContainer(FactoryInterface::class);
     $this->codecMatcher = $integration->getFromContainer(CodecMatcherInterface::class);
     $this->exceptionThrower = $integration->getFromContainer(ExceptionThrowerInterface::class);
     $this->parametersParser = $factory->createParametersParser();
     $this->supportedExtensions = $factory->createSupportedExtensions($this->extensions);
     $this->parametersChecker = $factory->createParametersChecker($this->exceptionThrower, $this->codecMatcher, $this->allowUnrecognizedParams, $this->allowedIncludePaths, $this->allowedFieldSetTypes, $this->allowedSortFields, $this->allowedPagingParameters, $this->allowedFilteringParameters);
     // information about extensions supported by the current controller might be used in exception handler
     $integration->setInContainer(SupportedExtensionsInterface::class, $this->supportedExtensions);
 }