PHP Class Nats\Message

Datei anzeigen Open project: repejota/phpnats Class Usage Examples

Public Methods

Method Description
__construct ( string $subject, string $body, string $sid, Connection $conn ) Message constructor.
__toString ( ) : string String representation of a message.
getBody ( ) : string Get body.
getConn ( ) : Connection Get Conn.
getSid ( ) : string Get Ssid.
getSubject ( ) : string Get subject.
reply ( string $body ) : void Allows you reply the message with a specific body.
setBody ( string $body ) Set body.
setConn ( Connection $conn ) Set Conn.
setSid ( string $sid ) Set Ssid.
setSubject ( string $subject ) Set subject.

Method Details

__construct() public method

Message constructor.
public __construct ( string $subject, string $body, string $sid, Connection $conn )
$subject string Message subject.
$body string Message body.
$sid string Message Sid.
$conn Connection Message Connection.

__toString() public method

String representation of a message.
public __toString ( ) : string
return string

getBody() public method

Get body.
public getBody ( ) : string
return string

getConn() public method

Get Conn.
public getConn ( ) : Connection
return Connection

getSid() public method

Get Ssid.
public getSid ( ) : string
return string

getSubject() public method

Get subject.
public getSubject ( ) : string
return string

reply() public method

Allows you reply the message with a specific body.
public reply ( string $body ) : void
$body string Body to be set.
return void

setBody() public method

Set body.
public setBody ( string $body )
$body string Body.

setConn() public method

Set Conn.
public setConn ( Connection $conn )
$conn Connection Connection.

setSid() public method

Set Ssid.
public setSid ( string $sid )
$sid string Ssid.

setSubject() public method

Set subject.
public setSubject ( string $subject )
$subject string Subject.