Protocol\FCGI\Record\BeginRequest::getRole PHP Метод

getRole() публичный Метод

The role component sets the role the Web server expects the application to play. The currently-defined roles are: FCGI_RESPONDER FCGI_AUTHORIZER FCGI_FILTER
public getRole ( ) : integer
Результат integer
    public function getRole()
    {
        return $this->role;
    }

Usage Example

Пример #1
0
 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));
 }