PHP Class Volkszaehler\Router

This class acts as a frontcontroller to route incomming requests
Author: Steffen Vogel ([email protected])
Afficher le fichier Open project: volkszaehler/volkszaehler.org Class Usage Examples

Méthodes publiques

Свойство Type Description
$controllerMapping context => controller mapping
$em Doctrine EntityManager
$operationMapping HTTP-method => operation mapping
$view output view
$viewMapping format => view mapping

Méthodes publiques

Méthode Description
__construct ( ) Constructor
createEntityManager ( $admin = FALSE ) Factory method for Doctrine EntityManager
handle ( Request $request, integer $type = HttpKernelInterface::MASTER_REQUEST, boolean $catch = true ) : Response Handle the request Source: Symfony\Component\HttpKernel\HttpKernel
handleRaw ( Request $request, integer $type = HttpKernelInterface::MASTER_REQUEST ) : Response Determine context, format and uuid of the raw request
handler ( Request $request, $context, $uuid ) Processes the request

Private Methods

Méthode Description
handleException ( Exception $e, Request $request, integer $type ) : Response Handles an exception by trying to convert it to a Response Source: Symfony\Component\HttpKernel\HttpKernel

Method Details

__construct() public méthode

Constructor
public __construct ( )

createEntityManager() public static méthode

Factory method for Doctrine EntityManager
public static createEntityManager ( $admin = FALSE )

handle() public méthode

Handle the request Source: Symfony\Component\HttpKernel\HttpKernel
public handle ( Request $request, integer $type = HttpKernelInterface::MASTER_REQUEST, boolean $catch = true ) : Response
$request Symfony\Component\HttpFoundation\Request A Request instance
$type integer The type of the request (for Symfony compatibility, not implemented)
$catch boolean Whether to catch exceptions or not
Résultat Symfony\Component\HttpFoundation\Response A Response instance

handleRaw() public méthode

Determine context, format and uuid of the raw request
public handleRaw ( Request $request, integer $type = HttpKernelInterface::MASTER_REQUEST ) : Response
$request Symfony\Component\HttpFoundation\Request A Request instance
$type integer The type of the request (for Symfony compatibility, not implemented)
Résultat Symfony\Component\HttpFoundation\Response A Response instance

handler() public méthode

Example: http://sub.domain.local/middleware.php/channel/550e8400-e29b-11d4-a716-446655440000/data.json?operation=edit&title=New Title
public handler ( Request $request, $context, $uuid )
$request Symfony\Component\HttpFoundation\Request

Property Details

$controllerMapping public_oe static_oe property

context => controller mapping
public static $controllerMapping

$em public_oe property

Doctrine EntityManager
public $em

$operationMapping public_oe static_oe property

HTTP-method => operation mapping
public static $operationMapping

$view public_oe property

output view
public $view

$viewMapping public_oe static_oe property

format => view mapping
public static $viewMapping