Stud.IP  5.4
StudipDispatcher Class Reference
Inheritance diagram for StudipDispatcher:

Public Member Functions

 __construct (ContainerInterface $container)
 
 trails_error ($exception)
 
 load_controller ($controller)
 

Protected Attributes

 $container
 

Detailed Description

Use this subclass to easily get an Stud.IP specific Trails_Dispatcher.

Example of use:

// deep in the Stud.IP jungle
$dispatcher->dispatch($requested_uri);

Constructor & Destructor Documentation

◆ __construct()

__construct ( ContainerInterface  $container)

Create a new Trails_Dispatcher with Stud.IP specific parameters for: trails_root is "$STUDIP_BASE_PATH/app", trails_uri is "dispatch.php" and default_controller is "default" (which does not map to anything).

Member Function Documentation

◆ load_controller()

load_controller (   $controller)

Loads the controller file for a given controller path and return an instance of that controller. If an error occures, an exception will be thrown.

Parameters
stringthe relative controller path
Returns
TrailsController an instance of that controller

◆ trails_error()

trails_error (   $exception)

Adapted error method that just passes the exception to stud.ip's exception instead of the standard trails handling.

Parameters
Exception$exceptionThe exception that occured
Exceptions
Exception

Field Documentation

◆ $container

$container
protected

The documentation for this class was generated from the following file: