private function writeRecord(int $requestId, int $type, string $content = null): void
    {
        $contentLength = null === $content ? 0 : strlen($content);

        $headerData = pack('CCnnxx', DaemonInterface::FCGI_VERSION_1, $type, $requestId, $contentLength);

        $this->connection->write($headerData);

        if (null !== $content) {
            $this->connection->write($content);
        }
    }
private function writeRecord(int $requestId, int $type, string $content = null): void
    {
        $contentLength = null === $content ? 0 : strlen($content);

        $headerData = pack('CCnnxx', DaemonInterface::FCGI_VERSION_1, $type, $requestId, $contentLength);

        $this->connection->write($headerData);

        if (null !== $content) {
            $this->connection->write($content);
        }
    }
private function writeRecord ( int $ requestId , int $ type , string $ content = null ) : void { $ contentLength = null === $ content ? 0 : strlen ( $ content ) ; $ headerData = pack ( 'CCnnxx' , DaemonInterface :: FCGI_VERSION_1 , $ type , $ requestId , $ contentLength ) ; $ this -> connection -> write ( $ headerData ) ; if ( null !== $ content ) { $ this -> connection -> write ( $ content ) ; } }
Write a record to the connection.

@param int    $requestId The request id to write to
@param int    $type      The type of record
@param string $content   The content of the record
Write a record to the connection .