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
コード例 #1
0
ファイル: ApplicationTest.php プロジェクト: mheydt/scalr
 /**
  * @test
  */
 public function testPatch()
 {
     $route = $this->app->patch('/path', function () {
         /* do nothing */
     });
     $this->assertEquals([Request::METHOD_PATCH], $route->getMethods());
 }
コード例 #2
0
ファイル: ApiApplication.php プロジェクト: scalr/scalr
 /**
  * {@inheritdoc}
  * @see Application::patch()
  */
 public function patch($path, $options, $requirements = [])
 {
     return parent::patch($path, $options, $requirements)->addMethod(Request::METHOD_OPTIONS);
 }