vendor/shopware/core/Framework/Routing/Exception/MissingRequestParameterException.php line 10

Open in your IDE?
  1. <?php declare(strict_types=1);
  2. namespace Shopware\Core\Framework\Routing\Exception;
  3. use Shopware\Core\Framework\Log\Package;
  4. use Shopware\Core\Framework\ShopwareHttpException;
  5. use Symfony\Component\HttpFoundation\Response;
  6. #[Package('core')]
  7. class MissingRequestParameterException extends ShopwareHttpException
  8. {
  9.     /**
  10.      * @var string
  11.      */
  12.     private $name;
  13.     /**
  14.      * @var string
  15.      */
  16.     private $path;
  17.     public function __construct(string $namestring $path '')
  18.     {
  19.         $this->name $name;
  20.         $this->path $path;
  21.         parent::__construct('Parameter "{{ parameterName }}" is missing.', ['parameterName' => $name]);
  22.     }
  23.     public function getName(): string
  24.     {
  25.         return $this->name;
  26.     }
  27.     public function getPath(): string
  28.     {
  29.         return $this->path;
  30.     }
  31.     public function getErrorCode(): string
  32.     {
  33.         return 'FRAMEWORK__MISSING_REQUEST_PARAMETER';
  34.     }
  35.     public function getStatusCode(): int
  36.     {
  37.         return Response::HTTP_BAD_REQUEST;
  38.     }
  39. }