ICanBoogie/Routing 2.5.x
  • Namespace
  • Class

Namespaces

  • ICanBoogie
    • Routing
      • Controller
      • Route
      • RouteDispatcher

Classes

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

Interfaces

  • Exception
  • ToSlug

Exceptions

  • ActionNotDefined
  • ControllerNotDefined
  • PatternNotDefined
  • PatternRequiresValues
  • RouteNotDefined

Functions

  • absolutize_url
  • contextualize
  • decontextualize

Class RouteMaker

Makes route definitions.

Namespace: ICanBoogie\Routing
Located at RouteMaker.php

Methods summary

public static array
# actions( string $name, string $controller, array $actions, array $options = [] )

Parameters

$name
$controller
$actions
Action templates.
$options

The following options are available:

  • only: Only the routes specified are made.
  • except: The routes specified are excluded.
  • id_name: Name of the identifier property. Defaults to id.
  • id_regex: Regex of the identifier value. Defaults to \d+.
  • as: Specifies the as option of the routes created.

Returns

array
public static array
# resource( string $name, string $controller, array $options = [] )

Makes route definitions for a resource.

Makes route definitions for a resource.

Parameters

$name
$controller
$options

The following options are available:

  • only: Only the routes specified are made.
  • except: The routes specified are excluded.
  • id_name: Name of the identifier property. Defaults to id.
  • id_regex: Regex of the identifier value. Defaults to \d+.
  • as: Specifies the as option of the routes created.
  • actions: Additional actions templates.

Returns

array
protected static array
# normalize_options( array $options )

Normalizes options.

Normalizes options.

Parameters

$options

Returns

array
protected static array
# get_resource_actions( )

Returns default resource actions.

Returns default resource actions.

Returns

array
protected static array
# filter_actions( array $actions, array $options = [] )

Filters actions according to only/except options.

Filters actions according to only/except options.

Parameters

$actions
$options

Returns

array
protected static array
# resolve_patterns( string $name, array $actions, array $options )

Replaces pattern placeholders.

Replaces pattern placeholders.

Parameters

$name
$actions
$options

Returns

array
ICanBoogie/Routing 2.5.x API documentation generated by ApiGen