PHP 클래스 Neos\Flow\Tests\FunctionalTestRequestHandler

As this request handler will be the "active" request handler returned by the bootstrap's getActiveRequestHandler() method, it also needs some support for HTTP request testing scenarios. For that reason it features a setRequest() method which is used by the FunctionalTestCase for setting the current HTTP request. That way, the request handler acts pretty much like the Http\RequestHandler from a client code perspective. The virtual browser's InternalRequestEngine will also set the current request via the setRequest() method.
상속: implements Neos\Flow\Http\HttpRequestHandlerInterface
파일 보기 프로젝트 열기: neos/flow-development-collection

보호된 프로퍼티들

프로퍼티 타입 설명
$bootstrap Neos\Flow\Core\Bootstrap
$componentContext Neos\Flow\Http\Component\ComponentContext

공개 메소드들

메소드 설명
__construct ( Bootstrap $bootstrap ) Constructor
canHandleRequest ( ) : boolean This request handler can handle requests in Testing Context.
getHttpRequest ( ) : Request Returns the currently processed HTTP request
getHttpResponse ( ) : Response Returns the HTTP response corresponding to the currently handled request
getPriority ( ) : integer Returns the priority - how eager the handler is to actually handle the request.
handleRequest ( ) : void Handles a command line request
setComponentContext ( ComponentContext $context ) : void Allows to set the currently processed HTTP component chain context by the base functional test case.
setHttpRequest ( Request $request ) : void Allows to set the currently processed HTTP request by the base functional test case.
setHttpResponse ( Response $response ) : void Allows to set the currently processed HTTP response by the base functional test case.

보호된 메소드들

메소드 설명
getComponentContext ( ) : ComponentContext Internal getter to ensure an existing ComponentContext.

메소드 상세

__construct() 공개 메소드

Constructor
public __construct ( Bootstrap $bootstrap )
$bootstrap Neos\Flow\Core\Bootstrap

canHandleRequest() 공개 메소드

This request handler can handle requests in Testing Context.
public canHandleRequest ( ) : boolean
리턴 boolean If the context is Testing, TRUE otherwise FALSE

getComponentContext() 보호된 메소드

Internal getter to ensure an existing ComponentContext.
protected getComponentContext ( ) : ComponentContext
리턴 Neos\Flow\Http\Component\ComponentContext

getHttpRequest() 공개 메소드

Returns the currently processed HTTP request
public getHttpRequest ( ) : Request
리턴 Neos\Flow\Http\Request

getHttpResponse() 공개 메소드

Returns the HTTP response corresponding to the currently handled request
public getHttpResponse ( ) : Response
리턴 Neos\Flow\Http\Response

getPriority() 공개 메소드

As this request handler can only be used as a preselected request handler, the priority for all other cases is 0.
public getPriority ( ) : integer
리턴 integer The priority of the request handler.

handleRequest() 공개 메소드

Handles a command line request
public handleRequest ( ) : void
리턴 void

setComponentContext() 공개 메소드

Allows to set the currently processed HTTP component chain context by the base functional test case.
또한 보기: InternalRequestEngine::sendRequest()
public setComponentContext ( ComponentContext $context ) : void
$context Neos\Flow\Http\Component\ComponentContext
리턴 void

setHttpRequest() 공개 메소드

Allows to set the currently processed HTTP request by the base functional test case.
사용 중단: since Flow 3.3, use setComponentContext() instead
public setHttpRequest ( Request $request ) : void
$request Neos\Flow\Http\Request
리턴 void

setHttpResponse() 공개 메소드

Allows to set the currently processed HTTP response by the base functional test case.
사용 중단: since Flow 3.3, use setComponentContext() instead
public setHttpResponse ( Response $response ) : void
$response Neos\Flow\Http\Response
리턴 void

프로퍼티 상세

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

protected Bootstrap,Neos\Flow\Core $bootstrap
리턴 Neos\Flow\Core\Bootstrap

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

protected ComponentContext,Neos\Flow\Http\Component $componentContext
리턴 Neos\Flow\Http\Component\ComponentContext