Documentation

SapiMock extends Sapi
in package

HTTP Response Mock object.

This class exists to make the transition to sabre/http easier.

Tags
copyright

Copyright (C) fruux GmbH (https://fruux.com/)

author

Evert Pot (http://evertpot.com/)

license

http://sabre.io/license/ Modified BSD License

Table of Contents

$sent  : mixed
createFromServerArray()  : Request
This static method will create a new Request object, based on a PHP $_SERVER array.
getRequest()  : Request
This static method will create a new Request object, based on the current PHP request.
sendResponse()  : mixed
Overriding this so nothing is ever echo'd.

Properties

Methods

createFromServerArray()

This static method will create a new Request object, based on a PHP $_SERVER array.

public static createFromServerArray(array<string|int, mixed> $serverArray) : Request

REQUEST_URI and REQUEST_METHOD are required.

Parameters
$serverArray : array<string|int, mixed>
Return values
Request

getRequest()

This static method will create a new Request object, based on the current PHP request.

public static getRequest() : Request
Return values
Request

Search results