Route

class OC\Route\Route
Source:lib/private/Route/Route.php#35
Parent:Symfony\Component\Routing\Route
Implements:OCP\Route\IRoute

Methods

public OC\Route\Route::method($method)
Specify the method when this route is to be used
Source:

lib/private/Route/Route.php#42

Parameters:
  • $method (string) HTTP method (uppercase)
Returns:

\OC\Route\Route

public OC\Route\Route::post()
Specify POST as the method to use with this route
Source:lib/private/Route/Route.php#51
Returns:\OC\Route\Route
public OC\Route\Route::get()
Specify GET as the method to use with this route
Source:lib/private/Route/Route.php#60
Returns:\OC\Route\Route
public OC\Route\Route::put()
Specify PUT as the method to use with this route
Source:lib/private/Route/Route.php#69
Returns:\OC\Route\Route
public OC\Route\Route::delete()
Specify DELETE as the method to use with this route
Source:lib/private/Route/Route.php#78
Returns:\OC\Route\Route
public OC\Route\Route::patch()
Specify PATCH as the method to use with this route
Source:lib/private/Route/Route.php#87
Returns:\OC\Route\Route
public OC\Route\Route::defaults($defaults)
Defaults to use for this route
Source:

lib/private/Route/Route.php#98

Parameters:
  • $defaults (array) The defaults
Returns:

\OC\Route\Route

public OC\Route\Route::requirements($requirements)
Requirements for this route
Source:

lib/private/Route/Route.php#114

Parameters:
  • $requirements (array) The requirements
Returns:

\OC\Route\Route

public OC\Route\Route::action($class, $function=null)
The action to execute when this route matches
Source:

lib/private/Route/Route.php#136

Parameters:
  • $class (string | callable) the class or a callable
  • $function (string) the function to use with the class
Returns:

\OC\Route\Route This function is called with $class set to a callable or to the class with $function

public OC\Route\Route::actionInclude($file)
The action to execute when this route matches, includes a file like
it is called directly
Source:

lib/private/Route/Route.php#151

Parameters:
  • $file (string)
Returns:

void