Protocol\FCGI\Record\BeginRequest::getFlags PHP Method

getFlags() public method

The flags component contains a bit that controls connection shutdown. flags & FCGI_KEEP_CONN: If zero, the application closes the connection after responding to this request. If not zero, the application does not close the connection after responding to this request; the Web server retains responsibility for the connection.
public getFlags ( ) : integer
return integer
    public function getFlags()
    {
        return $this->flags;
    }

Usage Example

 public function testPacking()
 {
     $request = new BeginRequest(FCGI::RESPONDER, FCGI::KEEP_CONN);
     $this->assertEquals(FCGI::BEGIN_REQUEST, $request->getType());
     $this->assertEquals(FCGI::RESPONDER, $request->getRole());
     $this->assertEquals(FCGI::KEEP_CONN, $request->getFlags());
     $this->assertSame(self::$rawMessage, bin2hex($request));
 }