\app\framework\Component\Route\KleinAbstractRouteFactory

AbstractRouteFactory

Abstract class for a factory for building new Route instances

Summary

Methods
Properties
Constants
__construct()
getNamespace()
setNamespace()
appendNamespace()
build()
No public properties found
No constants found
No protected methods found
$namespace
N/A
No private methods found
No private properties found
N/A

Properties

$namespace

$namespace : 

The namespace of which to collect the routes in when matching, so you can define routes under a common endpoint

Type

Methods

__construct()

__construct(string  $namespace = null) 

Constructor

Parameters

string $namespace

The initial namespace to set

getNamespace()

getNamespace() : string

Gets the value of namespace

Returns

string

appendNamespace()

appendNamespace(string  $namespace) : \app\framework\Component\Route\Klein\AbstractRouteFactory

Append a namespace to the current namespace

Parameters

string $namespace

The namespace from which to collect the Routes under

Returns

\app\framework\Component\Route\Klein\AbstractRouteFactory

build()

build(callable  $callback, string  $path = null, string|array  $method = null, boolean  $count_match = true, string  $name = null) : \app\framework\Component\Route\Klein\Route

Build factory method

This method should be implemented to return a Route instance

Parameters

callable $callback

Callable callback method to execute on route match

string $path

Route URI path to match

string|array $method

HTTP Method to match

boolean $count_match

Whether or not to count the route as a match when counting total matches

string $name

The name of the route

Returns

\app\framework\Component\Route\Klein\Route