PHP 클래스 Phprest\Application

상속: implements Symfony\Component\HttpKernel\HttpKernelInterface, implements Symfony\Component\HttpKernel\TerminableInterface, implements League\Container\ContainerAwareInterface, implements League\Event\ListenerAcceptorInterface, use trait League\Event\EmitterTrait, use trait League\Container\ContainerAwareTrait, use trait Phprest\Service\Hateoas\Getter, use trait Phprest\Service\Hateoas\Util, use trait Phprest\Service\Logger\Getter
파일 보기 프로젝트 열기: phprest/phprest 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$configuration Config
$exceptionDecorator callable
$router League\Route\RouteCollection
$stackBuilder Stack\Builder

공개 메소드들

메소드 설명
__construct ( Config $configuration )
delete ( string $route, mixed $action ) : void Add a DELETE route.
get ( string $route, mixed $action ) : void Add a GET route.
getConfiguration ( ) : Config
getEventEmitter ( ) : League\Event\EmitterInterface Return the event emitter.
getRouter ( ) : RouteCollection
handle ( Request $request, integer $type = self::MASTER_REQUEST, boolean $catch = true ) : Response Handle the request.
head ( string $route, mixed $action ) : void Add a HEAD route
options ( string $route, mixed $action ) : void Add a OPTIONS route
patch ( string $route, mixed $action ) : void Add a PATCH route.
post ( string $route, mixed $action ) : void Add a POST route.
put ( string $route, mixed $action ) : void Add a PUT route.
registerController ( string $class ) : void
registerMiddleware ( string $classPath, array $arguments = [] )
registerService ( Phprest\Service\Serviceable $service, Phprest\Service\Configurable $config ) : void
run ( Request $request = null ) : string Run the application
setExceptionDecorator ( callable $func ) : void Set the exception decorator.
subscribe ( string $event, callable $listener, integer $priority = ListenerAcceptorInterface::P_NORMAL ) Subscribe to an event.
terminate ( Request $request, Response $response ) : void Terminates a request/response cycle.

보호된 메소드들

메소드 설명
setErrorHandler ( ) : void

메소드 상세

__construct() 공개 메소드

public __construct ( Config $configuration )
$configuration Config

delete() 공개 메소드

Add a DELETE route.
public delete ( string $route, mixed $action ) : void
$route string
$action mixed
리턴 void

get() 공개 메소드

Add a GET route.
public get ( string $route, mixed $action ) : void
$route string
$action mixed
리턴 void

getConfiguration() 공개 메소드

public getConfiguration ( ) : Config
리턴 Config

getEventEmitter() 공개 메소드

Return the event emitter.
public getEventEmitter ( ) : League\Event\EmitterInterface
리턴 League\Event\EmitterInterface

getRouter() 공개 메소드

public getRouter ( ) : RouteCollection
리턴 Phprest\Router\RouteCollection

handle() 공개 메소드

Handle the request.
public handle ( Request $request, integer $type = self::MASTER_REQUEST, boolean $catch = true ) : Response
$request Symfony\Component\HttpFoundation\Request
$type integer
$catch boolean
리턴 Symfony\Component\HttpFoundation\Response

head() 공개 메소드

Add a HEAD route
public head ( string $route, mixed $action ) : void
$route string
$action mixed
리턴 void

options() 공개 메소드

Add a OPTIONS route
public options ( string $route, mixed $action ) : void
$route string
$action mixed
리턴 void

patch() 공개 메소드

Add a PATCH route.
public patch ( string $route, mixed $action ) : void
$route string
$action mixed
리턴 void

post() 공개 메소드

Add a POST route.
public post ( string $route, mixed $action ) : void
$route string
$action mixed
리턴 void

put() 공개 메소드

Add a PUT route.
public put ( string $route, mixed $action ) : void
$route string
$action mixed
리턴 void

registerController() 공개 메소드

public registerController ( string $class ) : void
$class string Namespaced class name
리턴 void

registerMiddleware() 공개 메소드

public registerMiddleware ( string $classPath, array $arguments = [] )
$classPath string
$arguments array

registerService() 공개 메소드

public registerService ( Phprest\Service\Serviceable $service, Phprest\Service\Configurable $config ) : void
$service Phprest\Service\Serviceable
$config Phprest\Service\Configurable
리턴 void

run() 공개 메소드

Run the application
public run ( Request $request = null ) : string
$request Symfony\Component\HttpFoundation\Request
리턴 string

setErrorHandler() 보호된 메소드

protected setErrorHandler ( ) : void
리턴 void

setExceptionDecorator() 공개 메소드

Set the exception decorator.
public setExceptionDecorator ( callable $func ) : void
$func callable
리턴 void

subscribe() 공개 메소드

Subscribe to an event.
public subscribe ( string $event, callable $listener, integer $priority = ListenerAcceptorInterface::P_NORMAL )
$event string
$listener callable
$priority integer

terminate() 공개 메소드

Terminates a request/response cycle.
public terminate ( Request $request, Response $response ) : void
$request Symfony\Component\HttpFoundation\Request
$response Symfony\Component\HttpFoundation\Response
리턴 void

프로퍼티 상세

$configuration 보호되어 있는 프로퍼티

protected Config,phprest $configuration
리턴 Config

$exceptionDecorator 보호되어 있는 프로퍼티

protected callable $exceptionDecorator
리턴 callable

$router 보호되어 있는 프로퍼티

protected RouteCollection,League\Route $router
리턴 League\Route\RouteCollection

$stackBuilder 보호되어 있는 프로퍼티

protected Builder,Stack $stackBuilder
리턴 Stack\Builder