Silla.IO API
  • Namespace
  • Class
  • Tree
  • Todo
  • Download

Namespaces

  • App
    • Controllers
  • CMS
    • Controllers
    • Helpers
    • Models
  • Configurations
    • CI
    • Development
    • Production
    • Staging
  • Core
    • Base
    • CLI
      • Cache
      • DB
    • Helpers
    • Modules
      • Cache
        • Adapters
        • Interfaces
      • Crypt
      • DB
        • Adapters
        • Decorators
          • Interfaces
        • Features
          • Paginator
        • Interfaces
      • Registry
      • Render
        • Adapters
        • Interfaces
      • Router
      • Session
        • Adapters
        • Interfaces
  • None
  • Tasks
    • DB

Classes

  • Request
  • Response
  • Router
  • Routes

Class Routes

Routes Class definition.

Final
Namespace: Core\Modules\Router
Located at modules/router/routes.php

Methods summary

public
# __construct( array $mode )

Init Routes.

Init Routes.

Parameters

$mode
Silla.IO mode.

Uses

Core\Cache()
public boolean
# add( array $val )

Adds a route.

Adds a route.

Parameters

$val
Example ['url' => string, 'maps_to' => string].

Returns

boolean
public array
# getAll( )

Get all added routes in reversed order.

Get all added routes in reversed order.

Returns

array
public array
# extractRoute( array $url )

Select the best route from all registered routes according url address.

Select the best route from all registered routes according url address.

Parameters

$url
URL elements array.

Returns

array
public array
# extractUrl( array $url_mapping )

Select the best routing rules according to url mapping.

Select the best routing rules according to url mapping.

Parameters

$url_mapping
Representation of URL address.

Returns

array
public array
# toRoute( string $pattern )

Prepares the url for the routing.

Prepares the url for the routing.

Parameters

$pattern
String representation of the url.

Returns

array
public array
# mode( )

Get mode.

Get mode.

Returns

array
private static array
# loadRoutes( array $mode )

Load router routing routes.

Load router routing routes.

Parameters

$mode
Silla.IO mode.

Returns

array

Uses

\Spyc

Properties summary

private array $routes

Stored all added routes.

Stored all added routes.

# array()
private array $mode

Representation of the Silla.IO mode.

Representation of the Silla.IO mode.

# array()
Silla.IO API API documentation generated by ApiGen