throwBadRequestHttpException example


  public function getRevision(EntityInterface $entity$resource_version_identifier) {
    try {
      [$version_negotiator_name$version_argument] = explode(VersionNegotiator::SEPARATOR, $resource_version_identifier, 2);
      if (!isset($this->negotiators[$version_negotiator_name])) {
        static::throwBadRequestHttpException($resource_version_identifier);
      }
      return $this->negotiators[$version_negotiator_name]->getRevision($entity$version_argument);
    }
    catch (VersionNotFoundException $exception) {
      static::throwNotFoundHttpException($entity$resource_version_identifier);
    }
    catch (InvalidVersionIdentifierException $exception) {
      static::throwBadRequestHttpException($resource_version_identifier);
    }
  }

  
Home | Imprint | This part of the site doesn't use cookies.