Ergo\Http\Request::export PHP Method

export() public method

public export ( ) : array
return array
    public function export()
    {
        return array($this->getRequestMethod(), (string) $this->getUrl(), $this->getHeaders()->toArray($crlf = false), $this->getBody());
    }

Usage Example

Example #1
0
 public function testExport()
 {
     $request = new Request(Request::METHOD_GET, 'http://example.org', array('Accept: text/html'), 'test data');
     $this->assertEquals($request->export(), array('GET', 'http://example.org/', array('Accept: text/html'), 'test data'));
 }