CakePHP
  • Documentation
    • Book
    • API
    • Videos
    • Reporting Security Issues
    • Privacy Policy
    • Logos & Trademarks
  • Business Solutions
  • Swag
  • Road Trip
  • Team
  • Community
    • Community
    • Get Involved
    • Issues (Github)
    • Bakery
    • Featured Resources
    • Training
    • Meetups
    • My CakePHP
    • CakeFest
    • Newsletter
    • Linkedin
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • Help & Support
    • Forum
    • Stack Overflow
    • IRC
    • Slack
    • Paid Support
CakePHP

C Queue 2.x API

  • Project:
    • Queue
      • CakePHP
      • Authentication
      • Authorization
      • Chronos
      • Elastic Search
      • Queue
  • Version:
    • 2.x
      • 2.x
      • 1.x

Namespaces

  • Cake\Queue
    • Command
    • Consumption
    • Job
    • Listener
    • Mailer
    • Model
    • Queue
    • TestSuite
      • Constraint
      • Transport

Class TestMessage

Test Message

Minimal message implementation for testing.

Namespace: Cake\Queue\TestSuite\Transport

Property Summary

  • $body protected
    string

    Message body

  • $headers protected
    array<string, mixed>

    Message headers

  • $properties protected
    array<string, mixed>

    Message properties

Method Summary

  • __construct() public

    Constructor

  • getBody() public

    Get body

  • getCorrelationId() public

    Get correlation ID

  • getHeader() public

    Get header

  • getHeaders() public

    Get headers

  • getMessageId() public

    Get message ID

  • getProperties() public

    Get properties

  • getProperty() public

    Get property

  • getReplyTo() public

    Get reply to

  • getTimestamp() public

    Get timestamp

  • isRedelivered() public

    Get redelivered flag

  • setBody() public

    Set body

  • setCorrelationId() public

    Set correlation ID

  • setHeader() public

    Set header

  • setHeaders() public

    Set headers

  • setMessageId() public

    Set message ID

  • setProperties() public

    Set properties

  • setProperty() public

    Set property

  • setRedelivered() public

    Set redelivered flag

  • setReplyTo() public

    Set reply to

  • setTimestamp() public

    Set timestamp

Method Detail

__construct() ¶ public

__construct(string $body = '', array<string, mixed> $properties = [], array<string, mixed> $headers = [])

Constructor

Parameters
string $body optional

Message body

array<string, mixed> $properties optional

Properties

array<string, mixed> $headers optional

Headers

getBody() ¶ public

getBody(): string

Get body

Returns
string

getCorrelationId() ¶ public

getCorrelationId(): string|null

Get correlation ID

Returns
string|null

getHeader() ¶ public

getHeader(string $name, mixed $default = null): mixed

Get header

Parameters
string $name

Header name

mixed $default optional

Default value

Returns
mixed

getHeaders() ¶ public

getHeaders(): array<string, mixed>

Get headers

Returns
array<string, mixed>

getMessageId() ¶ public

getMessageId(): string|null

Get message ID

When a message is sent, MessageId can be ignored.

Returns
string|null

getProperties() ¶ public

getProperties(): array<string, mixed>

Get properties

Returns
array<string, mixed>

getProperty() ¶ public

getProperty(string $name, mixed $default = null): mixed

Get property

Parameters
string $name

Property name

mixed $default optional

Default value

Returns
mixed

getReplyTo() ¶ public

getReplyTo(): string|null

Get reply to

Returns
string|null

getTimestamp() ¶ public

getTimestamp(): int|null

Get timestamp

Returns
int|null

isRedelivered() ¶ public

isRedelivered(): bool

Get redelivered flag

Returns
bool

setBody() ¶ public

setBody(string $body): void

Set body

Parameters
string $body

Body

Returns
void

setCorrelationId() ¶ public

setCorrelationId(?string $correlationId = null): void

Set correlation ID

Parameters
?string $correlationId optional

Correlation ID

Returns
void

setHeader() ¶ public

setHeader(string $name, mixed $value): void

Set header

Parameters
string $name

Header name

mixed $value

Header value

Returns
void

setHeaders() ¶ public

setHeaders(array $headers): void

Set headers

Parameters
array $headers

Headers

Returns
void

setMessageId() ¶ public

setMessageId(?string $messageId = null): void

Set message ID

Parameters
?string $messageId optional

Message ID

Returns
void

setProperties() ¶ public

setProperties(array $properties): void

Set properties

Parameters
array $properties

Properties

Returns
void

setProperty() ¶ public

setProperty(string $name, mixed $value): void

Set property

Parameters
string $name

Property name

mixed $value

Property value

Returns
void

setRedelivered() ¶ public

setRedelivered(bool $redelivered): void

Set redelivered flag

Parameters
bool $redelivered

Redelivered

Returns
void

setReplyTo() ¶ public

setReplyTo(?string $replyTo = null): void

Set reply to

Parameters
?string $replyTo optional

Reply to

Returns
void

setTimestamp() ¶ public

setTimestamp(?int $timestamp = null): void

Set timestamp

Parameters
?int $timestamp optional

Timestamp

Returns
void

Property Detail

$body ¶ protected

Message body

Type
string

$headers ¶ protected

Message headers

Type
array<string, mixed>

$properties ¶ protected

Message properties

Type
array<string, mixed>
OpenHub
Pingping
Linode
  • Business Solutions
  • Showcase
  • Documentation
  • Book
  • API
  • Videos
  • Reporting Security Issues
  • Privacy Policy
  • Logos & Trademarks
  • Community
  • Get Involved
  • Issues (Github)
  • Bakery
  • Featured Resources
  • Training
  • Meetups
  • My CakePHP
  • CakeFest
  • Newsletter
  • Linkedin
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • Help & Support
  • Forum
  • Stack Overflow
  • IRC
  • Slack
  • Paid Support

Generated using CakePHP API Docs