Navigation APIs

Author:Juti Noppornpitaks
Purpose:Internal Use Only

The navigation module is designed specifically for the dependency-injectable Application.

Please note that the term DOMElement used on this page denotes any of yotsuba.kotoba.Kotoba, yotsuba.kotoba.DOMElements and yotsuba.kotoba.DOMElement.

Additionally, the parameter route for any methods mentioned on this page is an instance of DOMElement.

class tori.navigation.DynamicRoute(route)

Dynamic route based on class Route handled by a controller.

controller()

Get the controller.

to_tuple()

Convert the route to tuple.

class tori.navigation.RelayRoute(route)

Relay routing directive based on Route used for redirection

destination()

Get the relaying destination.

is_permanent()

Check whether the relay route is permanent.

to_tuple()

Convert the route to tuple.

class tori.navigation.Route(route_data)

The abstract class representing a routing directive.

Parameters:route – an instance of kotoba.kotoba.Kotoba representing the route.
bean_class()

Get the class reference for the route.

Return type:type
static get_pattern(route_data)

Get the routing pattern for a given route.

static get_type(route_data)

Get the routing type for a given route.

source()

Get the original data for the route.

Return type:str
type()

Get the routing type.

Return type:str
class tori.navigation.RoutingMap

Routing Map

export()

Export the route map as a list of tuple representatives.

Return type:list
find_by_pattern(routing_pattern)

Get the route by routing_pattern where it is a string.

static make(configuration, base_path=None)

Make a routing table based on the given configuration.

Parameters:base_path – is an optional used by :method Route.make:.
register(route, force_action=False)

Register a route.

class tori.navigation.StaticRoute(route, base_path)

Static routing directive based on Route handled by a resource controller

Parameters:base_path – is a string indicating the base path for the static resource.
cache_enabled()

Check whether the caching option is enabled.

location()

Get the location of the static resource/content.

service()

Get the resource service.

to_tuple()

Convert the route to tuple.

Read the Docs v: v2.1
Versions
latest
v2.1
v2.0
Downloads
PDF
HTML
Epub
On Read the Docs
Project Home
Builds

Free document hosting provided by Read the Docs.