patch() public method

Adds patch route
public patch ( string $path, array | callable $options, array $requirements = [] ) : Scalr\Api\Rest\Routing\Route
$path string The path pattern of the route
$options array | callable The options
$requirements array optional The requirements
return Scalr\Api\Rest\Routing\Route Returns route instance
Example #1
0
 /**
  * @test
  */
 public function testPatch()
 {
     $route = $this->app->patch('/path', function () {
         /* do nothing */
     });
     $this->assertEquals([Request::METHOD_PATCH], $route->getMethods());
 }
Example #2
0
 /**
  * {@inheritdoc}
  * @see Application::patch()
  */
 public function patch($path, $options, $requirements = [])
 {
     return parent::patch($path, $options, $requirements)->addMethod(Request::METHOD_OPTIONS);
 }