PHP Class SebastiaanLuca\Router\Routers\Router

The base class every router should extend.
Show file Open project: sebastiaanluca/laravel-router

Protected Properties

Property Type Description
$api Dingo\Api\Routing\Router The Dingo API router.
$namespace string The default controller namespace.
$router SebastiaanLuca\Router\ExtendedRouter | Illuminate\Routing\Router The routing instance.

Public Methods

Method Description
__construct ( Illuminate\Contracts\Routing\Registrar $router ) Router constructor.
getNamespace ( string | null $suffix = null ) : string Get the default namespace with the suffix attached.
map ( ) Map the routes.

Protected Methods

Method Description
setUpApiRouter ( ) Assign the API router if the Dingo API package is installed.

Method Details

__construct() public method

Router constructor.
public __construct ( Illuminate\Contracts\Routing\Registrar $router )
$router Illuminate\Contracts\Routing\Registrar

getNamespace() public method

Get the default namespace with the suffix attached.
public getNamespace ( string | null $suffix = null ) : string
$suffix string | null
return string

map() abstract public method

Map the routes.
abstract public map ( )

setUpApiRouter() protected method

Assign the API router if the Dingo API package is installed.
protected setUpApiRouter ( )

Property Details

$api protected property

The Dingo API router.
protected Router,Dingo\Api\Routing $api
return Dingo\Api\Routing\Router

$namespace protected property

The default controller namespace.
protected string $namespace
return string

$router protected property

The routing instance.
protected ExtendedRouter,SebastiaanLuca\Router|Router,Illuminate\Routing $router
return SebastiaanLuca\Router\ExtendedRouter | Illuminate\Routing\Router