1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- <?php
- namespace Symfony\Component\Routing\Exception;
- class MethodNotAllowedException extends \RuntimeException implements ExceptionInterface
- {
- protected $allowedMethods = [];
-
- public function __construct(array $allowedMethods, ?string $message = '', int $code = 0, \Throwable $previous = null)
- {
- if (null === $message) {
- trigger_deprecation('symfony/routing', '5.3', 'Passing null as $message to "%s()" is deprecated, pass an empty string instead.', __METHOD__);
- $message = '';
- }
- $this->allowedMethods = array_map('strtoupper', $allowedMethods);
- parent::__construct($message, $code, $previous);
- }
-
- public function getAllowedMethods()
- {
- return $this->allowedMethods;
- }
- }
|