milfs/rest/vendor/slim/slim/Slim/Exception/InvalidMethodException.php
2018-10-13 12:01:33 -05:00

28 lines
692 B
PHP

<?php
/**
* Slim Framework (https://slimframework.com)
*
* @link https://github.com/slimphp/Slim
* @copyright Copyright (c) 2011-2017 Josh Lockhart
* @license https://github.com/slimphp/Slim/blob/3.x/LICENSE.md (MIT License)
*/
namespace Slim\Exception;
use Psr\Http\Message\ServerRequestInterface;
class InvalidMethodException extends \InvalidArgumentException
{
protected $request;
public function __construct(ServerRequestInterface $request, $method)
{
$this->request = $request;
parent::__construct(sprintf('Unsupported HTTP method "%s" provided', $method));
}
public function getRequest()
{
return $this->request;
}
}