Overview

Namespaces

  • Autarky
    • Config
      • Loaders
    • Console
    • Container
      • Exception
      • Factory
      • Proxy
    • Database
    • Errors
    • Events
    • Files
    • Http
    • Logging
    • Providers
    • Routing
      • Events
    • Testing
    • TwigTemplating
      • Extensions
    • Utils

Classes

  • Configuration
  • Controller
  • DefaultRouteConfigurator
  • Route
  • RoutePathGenerator
  • Router
  • RoutingProvider
  • UrlGenerator

Interfaces

  • InvokerInterface
  • RoutePathGeneratorInterface
  • RouterInterface

Traits

  • ControllerTrait
  • Overview
  • Namespace
  • Class

Interface RouterInterface

Interface for routers that the framework can utilize.

Direct known implementers

Autarky\Routing\Router
Namespace: Autarky\Routing
Located at Routing/RouterInterface.php
Methods summary
public Symfony\Component\HttpFoundation\Response
# dispatch( Symfony\Component\HttpFoundation\Request $request )

Dispatch a request in the router.

Dispatch a request in the router.

Parameters

$request

Returns

Symfony\Component\HttpFoundation\Response
public
# addRoute( string|array $method, string $path, string $handler, string $name = null )

Add a route to the router.

Add a route to the router.

Parameters

$method
HTTP methods the route should respond to
$path
Relative URL the route should respond to. Parameters wrapped in {}
$handler
string of "class:method" or "global_function"
$name
Route name (optional)
public Autarky\Routing\Route
# getRoute( string $name )

Given a route name, get the route object.

Given a route name, get the route object.

Parameters

$name

Returns

Autarky\Routing\Route

Throws

InvalidArgumentException
if route with the name does not exist
public Autarky\Routing\Route
# getCurrentRoute( )

Get the route matched to the current request.

Get the route matched to the current request.

Returns

Autarky\Routing\Route
public
# group( array $flags, Closure $callback )

Define a route group.

Define a route group.

Parameters

$flags
Valid keys are 'before', 'after', 'prefix'
$callback
First argument is the router ($this)
public
# mount( array $routes, string $path = '/' )

Mount an array config onto the routes.

Mount an array config onto the routes.

Parameters

$routes
$path
Autarky Framework API documentation generated by ApiGen