Webiny\Component\Http\Response::create PHP Method

create() public static method

Static constructor.
public static create ( string $content = '', integer $statusCode = 200, array $headers = [] ) : Response
$content string Content that will be attached to the response.
$statusCode integer HTTP status code that will be sent back to the user.
$headers array Additional headers that should be attached to the response.
return Response
    public static function create($content = '', $statusCode = 200, $headers = [])
    {
        return new self($content, $statusCode, $headers);
    }

Usage Example

Esempio n. 1
0
 public function testCacheControl()
 {
     $response = Response::create();
     $this->assertInstanceOf('\\Webiny\\Component\\Http\\Response\\CacheControl', $response->cacheControl());
 }