Basicis - Core

Logo

As the name says, it is made to be basic and direct.

View the Project on GitHub basicis/core

Basicis\Router\Route

Route Class

Methods

Name Description
__construct Function __construct
getArguments Function getArguments
Get route arguments  
getCallback Function getCallback
Get route callback if this is a Closure, else return null  
getCallbackString Function getCallbackString
Get route callback if this is a string, else return null  
getMethod Function getMethod
Get route method  
getMiddlewares Function getMiddlewares
Get a array with route middlewares keys  
getName Function getName
Get route name/url  
setArgument Function setArgument
Set route argument  
setArguments Function setArguments
Set route arguments  
setCallback Function setCallback
Set route a callback  

Route::__construct

Description

public __construct (string $url, string $method, mixed $callback, mixed $middlewares)

Function __construct

Parameters

Return Values

void


Route::getArguments

Description

public getArguments (void)

Function getArguments Get route arguments

Parameters

This function has no parameters.

Return Values

array


Route::getCallback

Description

public getCallback (void)

Function getCallback Get route callback if this is a Closure, else return null

Parameters

This function has no parameters.

Return Values

\Closure|string|null


Route::getCallbackString

Description

public getCallbackString (void)

Function getCallbackString Get route callback if this is a string, else return null

Parameters

This function has no parameters.

Return Values

string|null


Route::getMethod

Description

public getMethod (void)

Function getMethod Get route method

Parameters

This function has no parameters.

Return Values

string


Route::getMiddlewares

Description

public getMiddlewares (void)

Function getMiddlewares Get a array with route middlewares keys

Parameters

This function has no parameters.

Return Values

array


Route::getName

Description

public getName (void)

Function getName Get route name/url

Parameters

This function has no parameters.

Return Values

string


Route::setArgument

Description

public setArgument (string $key, mixed $value)

Function setArgument Set route argument

Parameters

Return Values

\Route


Route::setArguments

Description

public setArguments (array $args)

Function setArguments Set route arguments

Parameters

Return Values

\Route


Route::setCallback

Description

public setCallback (void)

Function setCallback Set route a callback

Parameters

This function has no parameters.

Return Values

\Route