本文整理汇总了PHP中TYPO3\Flow\Http\Response类的典型用法代码示例。如果您正苦于以下问题:PHP Response类的具体用法?PHP Response怎么用?PHP Response使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Response类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: logApiCall
/**
* @param string $url
* @param string $method
* @param Response $response
* @return void
*/
public function logApiCall($url, $method, Response $response)
{
if ($this->settings['gitApi']['requestListener']['log'] === TRUE) {
$directory = $this->getLogDirectory();
file_put_contents($directory . '/SurfCaptain_Request.log', $method . '_' . $url . "\n", FILE_APPEND);
file_put_contents($directory . '/SurfCaptain_Request.log', $response->getContent() . "\n", FILE_APPEND);
}
}
示例2: __construct
/**
*
*/
public function __construct($message, $code, \TYPO3\Flow\Http\Response $response, \TYPO3\Flow\Http\Request $request = NULL, \Exception $previous = NULL)
{
$this->response = $response;
$this->request = $request;
if ($request !== NULL) {
$message = sprintf("[%s %s]: %s\n\nRequest data: %s", $request->getMethod(), $request->getUri(), $message . '; Response body: ' . $response->getContent(), $request->getContent());
}
parent::__construct($message, $code, $previous);
}
示例3: evaluate
/**
* Just return the processed value
*
* @return mixed
*/
public function evaluate()
{
$httpResponse = new Response();
$httpResponse->setStatus($this->getStatusCode());
$httpResponse->setHeaders(new Headers());
foreach ($this->getHeaders() as $name => $value) {
$httpResponse->setHeader($name, $value);
}
return implode("\r\n", $httpResponse->renderHeaders()) . "\r\n\r\n";
}
示例4: startAuthentication
/**
* Starts the authentication by redirecting to the SSO endpoint
*
* The redirect includes the callback URI (the original URI from the given request)
* the client identifier and a signature of the arguments with the client private key.
*
* @param \TYPO3\Flow\Http\Request $request The current request
* @param \TYPO3\Flow\Http\Response $response The current response
* @return void
*/
public function startAuthentication(Request $request, Response $response)
{
$callbackUri = $request->getUri();
if (!isset($this->options['server'])) {
throw new Exception('Missing "server" option for SingleSignOnRedirect entry point. Please specifiy one using the entryPointOptions setting.', 1351690358);
}
$ssoServer = $this->ssoServerFactory->create($this->options['server']);
$ssoClient = $this->ssoClientFactory->create();
$redirectUri = $ssoServer->buildAuthenticationEndpointUri($ssoClient, $callbackUri);
$response->setStatus(303);
$response->setHeader('Location', $redirectUri);
}
示例5: echoExceptionWeb
/**
* Echoes an exception for the web.
*
* @param \Exception $exception The exception
* @return void
*/
protected function echoExceptionWeb(\Exception $exception)
{
if ($exception instanceof Exception) {
$statusCode = 400;
$json = ['status' => 'invalid_request', 'reason' => $exception->getMessage()];
} elseif ($exception instanceof \TYPO3\Flow\Security\Exception) {
$statusCode = 403;
$json = ['status' => 'unauthorized', 'reason' => $exception->getMessage()];
} else {
$statusCode = 500;
if ($exception instanceof FlowException) {
$statusCode = $exception->getStatusCode();
}
$json = ['status' => 'error', 'reason' => $exception->getMessage(), 'errorClass' => get_class($exception)];
}
if ($exception->getPrevious() !== NULL) {
$json['previous'] = $exception->getPrevious()->getMessage();
}
$json['stacktrace'] = explode("\n", $exception->getTraceAsString());
$statusMessage = Response::getStatusMessageByCode($statusCode);
if (!headers_sent()) {
header(sprintf('HTTP/1.1 %s %s', $statusCode, $statusMessage));
header('Content-Type: application/json');
}
print json_encode($json);
}
示例6: throwStatusSetsTheStatusMessageAsContentIfNoFurtherContentIsProvided
/**
* @test
*/
public function throwStatusSetsTheStatusMessageAsContentIfNoFurtherContentIsProvided()
{
$controller = $this->getAccessibleMock(\TYPO3\Flow\Mvc\Controller\AbstractController::class, array('processRequest'));
$controller->_call('initializeController', $this->mockActionRequest, $this->mockHttpResponse);
$this->mockHttpResponse->expects($this->atLeastOnce())->method('setStatus')->with(404, null);
$this->mockHttpResponse->expects($this->atLeastOnce())->method('getStatus')->will($this->returnValue('404 Not Found'));
$this->mockHttpResponse->expects($this->atLeastOnce())->method('setContent')->with('404 Not Found');
try {
$controller->_call('throwStatus', 404);
} catch (\TYPO3\Flow\Mvc\Exception\StopActionException $e) {
}
}
示例7: startAuthentication
/**
* Starts the authentication: Redirect to login page
*
* @param \TYPO3\Flow\Http\Request $request The current request
* @param \TYPO3\Flow\Http\Response $response The current response
* @return void
* @throws MissingConfigurationException
*/
public function startAuthentication(Request $request, Response $response)
{
if (isset($this->options['routeValues'])) {
$routeValues = $this->options['routeValues'];
if (!is_array($routeValues)) {
throw new MissingConfigurationException(sprintf('The configuration for the WebRedirect authentication entry point is incorrect. "routeValues" must be an array, got "%s".', gettype($routeValues)), 1345040415);
}
$actionRequest = new ActionRequest($request);
$this->uriBuilder->setRequest($actionRequest);
$actionName = $this->extractRouteValue($routeValues, '@action');
$controllerName = $this->extractRouteValue($routeValues, '@controller');
$packageKey = $this->extractRouteValue($routeValues, '@package');
$subPackageKey = $this->extractRouteValue($routeValues, '@subpackage');
$uri = $this->uriBuilder->setCreateAbsoluteUri(true)->uriFor($actionName, $routeValues, $controllerName, $packageKey, $subPackageKey);
} elseif (isset($this->options['uri'])) {
$uri = strpos($this->options['uri'], '://') !== false ? $this->options['uri'] : $request->getBaseUri() . $this->options['uri'];
} else {
throw new MissingConfigurationException('The configuration for the WebRedirect authentication entry point is incorrect or missing. You need to specify either the target "uri" or "routeValues".', 1237282583);
}
$response->setContent(sprintf('<html><head><meta http-equiv="refresh" content="0;url=%s"/></head></html>', htmlentities($uri, ENT_QUOTES, 'utf-8')));
$response->setStatus(303);
$response->setHeader('Location', $uri);
}
示例8: handleRequest
/**
* Handles a HTTP request
*
* @return void
*/
public function handleRequest()
{
// Create the request very early so the Resource Management has a chance to grab it:
$this->request = Request::createFromEnvironment();
$this->response = new Response();
$this->boot();
$this->resolveDependencies();
if (isset($this->settings['http']['baseUri'])) {
$this->request->setBaseUri(new Uri($this->settings['http']['baseUri']));
}
$componentContext = new ComponentContext($this->request, $this->response);
$this->baseComponentChain->handle($componentContext);
$this->response->send();
$this->bootstrap->shutdown(Bootstrap::RUNLEVEL_RUNTIME);
$this->exit->__invoke();
}
示例9: handleRequest
/**
* Handles a HTTP request
*
* @return void
*/
public function handleRequest()
{
// Create the request very early so the Resource Management has a chance to grab it:
$this->request = Request::createFromEnvironment();
$this->response = new Response();
$this->boot();
$this->resolveDependencies();
$this->request->injectSettings($this->settings);
$this->router->setRoutesConfiguration($this->routesConfiguration);
$actionRequest = $this->router->route($this->request);
$this->securityContext->setRequest($actionRequest);
$this->dispatcher->dispatch($actionRequest, $this->response);
$this->response->makeStandardsCompliant($this->request);
$this->response->send();
$this->bootstrap->shutdown('Runtime');
$this->exit->__invoke();
}
示例10: echoExceptionWeb
/**
* Echoes an exception for the web.
*
* @param \Exception $exception The exception
* @return void
*/
protected function echoExceptionWeb(\Exception $exception)
{
if ($exception instanceof Exception) {
$statusCode = 400;
$json = ['status' => 'invalid_request'];
} elseif ($exception instanceof \TYPO3\Flow\Security\Exception) {
$statusCode = 403;
$json = ['status' => 'unauthorized'];
} else {
$statusCode = 500;
if ($exception instanceof FlowException) {
$statusCode = $exception->getStatusCode();
}
$json = ['status' => 'error'];
}
$statusMessage = Response::getStatusMessageByCode($statusCode);
if (!headers_sent()) {
header(sprintf('HTTP/1.1 %s %s', $statusCode, $statusMessage));
header('Content-Type: application/json');
}
print json_encode($json);
}
示例11: shutdownCreatesSpecialDataEntryForSessionWithAuthenticatedAccounts
/**
* @test
*/
public function shutdownCreatesSpecialDataEntryForSessionWithAuthenticatedAccounts()
{
$session = new Session();
$this->inject($session, 'bootstrap', $this->mockBootstrap);
$this->inject($session, 'objectManager', $this->mockObjectManager);
$this->inject($session, 'settings', $this->settings);
$this->inject($session, 'metaDataCache', $this->createCache('Meta'));
$this->inject($session, 'storageCache', $this->createCache('Storage'));
$session->initializeObject();
$session->start();
$account = new Account();
$account->setAccountIdentifier('admin');
$account->setAuthenticationProviderName('MyProvider');
$token = new UsernamePassword();
$token->setAuthenticationStatus(TokenInterface::AUTHENTICATION_SUCCESSFUL);
$token->setAccount($account);
$this->mockSecurityContext->expects($this->any())->method('isInitialized')->will($this->returnValue(TRUE));
$this->mockSecurityContext->expects($this->any())->method('getAuthenticationTokens')->will($this->returnValue(array($token)));
$session->close();
$this->httpRequest->setCookie($this->httpResponse->getCookie('TYPO3_Flow_Session'));
$session->resume();
$this->assertEquals(array('MyProvider:admin'), $session->getData('TYPO3_Flow_Security_Accounts'));
}
示例12: buildCustomFluidView
/**
* Prepares a Fluid view for rendering the custom error page.
*
* @param \Exception $exception
* @param array $renderingOptions Rendering options as defined in the settings
* @return StandaloneView
*/
protected function buildCustomFluidView(\Exception $exception, array $renderingOptions)
{
$statusCode = 500;
$referenceCode = NULL;
if ($exception instanceof FlowException) {
$statusCode = $exception->getStatusCode();
$referenceCode = $exception->getReferenceCode();
}
$statusMessage = Response::getStatusMessageByCode($statusCode);
$fluidView = new StandaloneView();
$fluidView->getRequest()->setControllerPackageKey('TYPO3.Flow');
$fluidView->setTemplatePathAndFilename($renderingOptions['templatePathAndFilename']);
if (isset($renderingOptions['layoutRootPath'])) {
$fluidView->setLayoutRootPath($renderingOptions['layoutRootPath']);
}
if (isset($renderingOptions['partialRootPath'])) {
$fluidView->setPartialRootPath($renderingOptions['partialRootPath']);
}
if (isset($renderingOptions['format'])) {
$fluidView->setFormat($renderingOptions['format']);
}
if (isset($renderingOptions['variables'])) {
$fluidView->assignMultiple($renderingOptions['variables']);
}
$fluidView->assignMultiple(array('exception' => $exception, 'renderingOptions' => $renderingOptions, 'statusCode' => $statusCode, 'statusMessage' => $statusMessage, 'referenceCode' => $referenceCode));
return $fluidView;
}
示例13: getResponse
/**
* @return Response
*/
protected function getResponse()
{
$responseInfo = $this->oAuthClient->getLastResponseInfo();
$response = Response::createFromRaw($responseInfo['headers_recv']);
$response->appendContent($this->oAuthClient->getLastResponse());
return $response;
}
示例14: renderStatically
/**
* Returns the statically rendered exception message
*
* @param integer $statusCode
* @param string $referenceCode
* @return string
*/
protected function renderStatically($statusCode, $referenceCode)
{
$statusMessage = \TYPO3\Flow\Http\Response::getStatusMessageByCode($statusCode);
$referenceCodeMessage = $referenceCode !== NULL ? '<p>When contacting the maintainer of this application please mention the following reference code:<br /><br />' . $referenceCode . '</p>' : '';
return '<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<title>' . $statusCode . ' ' . $statusMessage . '</title>
<style type="text/css">
body {
font-family: Helvetica, Arial, sans-serif;
margin: 0;
}
h1 {
font-size: 15px;
}
.ApplicationWindow {
position: absolute;
width: 100%;
height: 100%;
background-color: #515151;
margin: 0;
z-index:1000;
}
.FloatingWindow {
width: 500px;
height: 360px;
background-color: none;
background-image: url(data:image/gif;base64,iVBORw0KGgoAAAANSUhEUgAAAfkAAAFwCAYAAAC7CQL0AAAACXBIWXMAAAsTAAALEwEAmpwYAAAKT2lDQ1BQaG90b3Nob3AgSUNDIHByb2ZpbGUAAHjanVNnVFPpFj333vRCS4iAlEtvUhUIIFJCi4AUkSYqIQkQSoghodkVUcERRUUEG8igiAOOjoCMFVEsDIoK2AfkIaKOg6OIisr74Xuja9a89+bN/rXXPues852zzwfACAyWSDNRNYAMqUIeEeCDx8TG4eQuQIEKJHAAEAizZCFz/SMBAPh+PDwrIsAHvgABeNMLCADATZvAMByH/w/qQplcAYCEAcB0kThLCIAUAEB6jkKmAEBGAYCdmCZTAKAEAGDLY2LjAFAtAGAnf+bTAICd+Jl7AQBblCEVAaCRACATZYhEAGg7AKzPVopFAFgwABRmS8Q5ANgtADBJV2ZIALC3AMDOEAuyAAgMADBRiIUpAAR7AGDIIyN4AISZABRG8lc88SuuEOcqAAB4mbI8uSQ5RYFbCC1xB1dXLh4ozkkXKxQ2YQJhmkAuwnmZGTKBNA/g88wAAKCRFRHgg/P9eM4Ors7ONo62Dl8t6r8G/yJiYuP+5c+rcEAAAOF0ftH+LC+zGoA7BoBt/qIl7gRoXgugdfeLZrIPQLUAoOnaV/Nw+H48PEWhkLnZ2eXk5NhKxEJbYcpXff5nwl/AV/1s+X48/Pf14L7iJIEyXYFHBPjgwsz0TKUcz5IJhGLc5o9H/LcL//wd0yLESWK5WCoU41EScY5EmozzMqUiiUKSKcUl0v9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hD23NH0lekdgEs41behfLR9V/BzWy7sZ86NPzg4aI+Pjzee5HOhX2uS7zVJuEu31cDpXeABuIyhL031bSHepZjnthcCv80knwt9+rV0Ao9j3xXyXNgFHoCrFvpQiPSQLbc6EMYGvi/ycdRLP0gu2F1fK8Vd4AG4CqHPxb4U7dLXsvc7NvBDIp8+SGmybwuxHhJycQfgKsa+6w+Avu9tHPaxke99AsfHx1XPDynoAAh/wbYxL0a3bVsvAQBcQbVfAQCIPAAg8gCAyAMAIg8AiDwAiLxfAQCIPAAg8gDAy/bfAQDpDpA3DxeAjAAAAABJRU5ErkJggg==);
}
.FloatingWindow .Window_TitleBar {
font-size: 13px;
position: relative;
padding: 25px 0 0 26px;
width: 440px;
text-align: center;
color: #404040;
}
.FloatingWindow .Window_Body {
font-size: 14px;
position: relative;
padding: 30px 0 0 50px;
width: 400px;
text-align: left;
color: #202020;
line-height: 18px;
}
.StandardView_Package {
width: 70px;
float: right;
margin: 0 0 80px 10px;
}
</style>
<!--[if lte IE 7]>
<style type="text/css">
.FloatingWindow {
background-color: #ccc;
background-image: none;
}
.Window_TitleBar {
background-color:#aaa;
font-weight:bold;
}
.StandardView_Package {
display:none;
}
</style>
<![endif]-->
</head>
<body>
<div class="ApplicationWindow">
<div class="FloatingWindow">
<div class="Window_TitleBar">' . $statusCode . ' ' . $statusMessage . '</div>
<div class="Window_Body">
<h1>' . $statusCode . ' ' . $statusMessage . '</h1>
<p>An internal error occurred.</p>
' . $referenceCodeMessage . '
</div>
</div>
</div>
</body>
</html>';
}
示例15: browserHaltsOnExceedingMaximumRedirections
/**
* @test
* @expectedException \TYPO3\Flow\Http\Client\InfiniteRedirectionException
*/
public function browserHaltsOnExceedingMaximumRedirections()
{
$requestEngine = $this->getMock(\TYPO3\Flow\Http\Client\RequestEngineInterface::class);
for ($i = 0; $i <= 10; $i++) {
$response = new Response();
$response->setHeader('Location', 'http://localhost/this/willLead/you/knowhere/' . $i);
$response->setStatus(301);
$requestEngine->expects($this->at($i))->method('sendRequest')->will($this->returnValue($response));
}
$this->browser->setRequestEngine($requestEngine);
$this->browser->request('http://localhost/some/initialRequest');
}