Heratio Framework API Reference

sfRoute
in package

Table of Contents

Methods

__construct()  : mixed
generate()  : string
Generate a URL from route parameters.
getDefaults()  : array<string|int, mixed>
Get route defaults.
getObject()  : object|null
Get a specific route object (used by action->getRoute()->getObject()).
getOptions()  : array<string|int, mixed>
Get route options.
getParameters()  : array<string|int, mixed>
Get route parameters (matched values).
getPattern()  : string
Get the route pattern.
getRequirements()  : array<string|int, mixed>
Get route requirements.
matches()  : bool
Check if the route matches a URL.

Methods

__construct()

public __construct([string $pattern = '' ][, array<string|int, mixed> $defaults = [] ][, array<string|int, mixed> $requirements = [] ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$pattern : string = ''
$defaults : array<string|int, mixed> = []
$requirements : array<string|int, mixed> = []
$options : array<string|int, mixed> = []

generate()

Generate a URL from route parameters.

public generate(array<string|int, mixed> $params[, bool $absolute = false ]) : string
Parameters
$params : array<string|int, mixed>
$absolute : bool = false
Return values
string

getDefaults()

Get route defaults.

public getDefaults() : array<string|int, mixed>
Return values
array<string|int, mixed>

getObject()

Get a specific route object (used by action->getRoute()->getObject()).

public getObject() : object|null
Return values
object|null

getOptions()

Get route options.

public getOptions() : array<string|int, mixed>
Return values
array<string|int, mixed>

getParameters()

Get route parameters (matched values).

public getParameters() : array<string|int, mixed>
Return values
array<string|int, mixed>

getPattern()

Get the route pattern.

public getPattern() : string
Return values
string

getRequirements()

Get route requirements.

public getRequirements() : array<string|int, mixed>
Return values
array<string|int, mixed>

matches()

Check if the route matches a URL.

public matches(string $url[, array<string|int, mixed> $context = [] ]) : bool
Parameters
$url : string
$context : array<string|int, mixed> = []
Return values
bool

        
On this page

Search results