ICanBoogie/Routing master
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • Routing
      • Controller
      • Route
      • RouteDispatcher

Classes

  • Controller
  • FormattedRoute
  • Helpers
  • Pattern
  • Route
  • RouteCollection
  • RouteDefinition
  • RouteDispatcher
  • RouteMaker

Interfaces

  • Exception
  • ToSlug

Exceptions

  • ActionNotDefined
  • ControllerNotDefined
  • PatternNotDefined
  • PatternRequiresValues
  • RouteNotDefined

Functions

  • absolutize_url
  • contextualize
  • decontextualize

Class RouteDefinition

The class defines options that can be used to define a route as well as means to normalize and validate this definition.

Namespace: ICanBoogie\Routing
Located at RouteDefinition.php

Methods summary

public static
# normalize( array & $definition )

Normalizes a route definition.

Normalizes a route definition.

Parameters

$definition
public static string
# ensure_has_id( array & $definition )

Ensures that a route definition has an identifier and generates one if required.

Ensures that a route definition has an identifier and generates one if required.

Parameters

$definition

Returns

string
The route identifier.
public static
# assert_is_valid( array $definition )

Asserts that a route definition is valid.

Asserts that a route definition is valid.

Parameters

$definition

Throws

ICanBoogie\Routing\PatternNotDefined
when the pattern is not defined
ICanBoogie\Routing\ControllerNotDefined
when both controller and location are not defined.

Constants summary

string PATTERN

Pattern of the route.

Pattern of the route.

# 'pattern'
string CONTROLLER

A controller class name (with an optional action) or a callable.

A controller class name (with an optional action) or a callable.

# 'controller'
string ACTION

The controller action.

The controller action.

# 'action'
string ID

An identifier.

An identifier.

# 'id'
string LOCATION

A redirection target.

A redirection target.

# 'location'
string VIA

Request method(s) accepted by the route.

Request method(s) accepted by the route.

# 'via'
string CONSTRUCTOR

Route constructor, a class name for now.

Route constructor, a class name for now.

# 'class'
ICanBoogie/Routing master API documentation generated by ApiGen