put() public method

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