PHP Класс Volkszaehler\Router

This class acts as a frontcontroller to route incomming requests
Автор: Steffen Vogel ([email protected])
Показать файл Открыть проект Примеры использования класса

Открытые свойства

Свойство Тип Описание
$controllerMapping context => controller mapping
$em Doctrine EntityManager
$operationMapping HTTP-method => operation mapping
$view output view
$viewMapping format => view mapping

Открытые методы

Метод Описание
__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

Приватные методы

Метод Описание
handleException ( Exception $e, Request $request, integer $type ) : Response Handles an exception by trying to convert it to a Response Source: Symfony\Component\HttpKernel\HttpKernel

Описание методов

__construct() публичный метод

Constructor
public __construct ( )

createEntityManager() публичный статический метод

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

handle() публичный метод

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
Результат Symfony\Component\HttpFoundation\Response A Response instance

handleRaw() публичный метод

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)
Результат Symfony\Component\HttpFoundation\Response A Response instance

handler() публичный метод

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

Описание свойств

$controllerMapping публичное статическое свойство

context => controller mapping
public static $controllerMapping

$em публичное свойство

Doctrine EntityManager
public $em

$operationMapping публичное статическое свойство

HTTP-method => operation mapping
public static $operationMapping

$view публичное свойство

output view
public $view

$viewMapping публичное статическое свойство

format => view mapping
public static $viewMapping