Phly\Http\HeaderStack::stack PHP Method

stack() public static method

Return the current header stack
public static stack ( ) : array
return array
    public static function stack()
    {
        return self::$data;
    }

Usage Example

コード例 #1
0
ファイル: SapiEmitterTest.php プロジェクト: phly/http
 public function testEmitsResponseHeaders()
 {
     $response = (new Response())->withStatus(200)->withAddedHeader('Content-Type', 'text/plain');
     $response->getBody()->write('Content!');
     ob_start();
     $this->emitter->emit($response);
     ob_end_clean();
     $this->assertContains('HTTP/1.1 200 OK', HeaderStack::stack());
     $this->assertContains('Content-Type: text/plain', HeaderStack::stack());
 }
All Usage Examples Of Phly\Http\HeaderStack::stack