PHP 클래스 Volkszaehler\Router

This class acts as a frontcontroller to route incomming requests
저자: Steffen Vogel ([email protected])
파일 보기 프로젝트 열기: volkszaehler/volkszaehler.org 1 사용 예제들

공개 프로퍼티들

프로퍼티 타입 설명
$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