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

Class Message

Namespace: Cake\Queue\Job

Property Summary

  • $callable protected
    ?Closure
  • $container protected
    ?ContainerInterface
  • $context protected
    Context
  • $originalMessage protected
    QueueMessage
  • $parsedBody protected
    array

Method Summary

  • __construct() public
  • __toString() public
  • getArgument() public
  • getCallable() public

    Get a closure containing the callable in the job.

  • getContext() public
  • getMaxAttempts() public

    The maximum number of attempts allowed by the job.

  • getOriginalMessage() public
  • getParsedBody() public
  • getTarget() public

    Get the target class and method.

  • jsonSerialize() public

Method Detail

__construct() ¶ public

__construct(Interop\Queue\Message $originalMessage, Interop\Queue\Context $context, Cake\Core\ContainerInterface|null $container = null)
Parameters
Interop\Queue\Message $originalMessage

Queue message.

Interop\Queue\Context $context

Context.

Cake\Core\ContainerInterface|null $container optional

DI container instance

__toString() ¶ public

__toString(): string
Returns
string

getArgument() ¶ public

getArgument(mixed $key = null, mixed $default = null): mixed
Parameters
mixed $key optional

Key

mixed $default optional

Default value.

Returns
mixed

getCallable() ¶ public

getCallable(): Closure

Get a closure containing the callable in the job.

Supported callables include:

  • array of [class, method]. The class will be constructed with no constructor parameters.
Returns
Closure

getContext() ¶ public

getContext(): Interop\Queue\Context
Returns
Interop\Queue\Context

getMaxAttempts() ¶ public

getMaxAttempts(): int|null

The maximum number of attempts allowed by the job.

Returns
int|null

getOriginalMessage() ¶ public

getOriginalMessage(): Interop\Queue\Message
Returns
Interop\Queue\Message

getParsedBody() ¶ public

getParsedBody(): array
Returns
array

getTarget() ¶ public

getTarget(): array{string, string}

Get the target class and method.

Returns
array{string, string}

jsonSerialize() ¶ public

jsonSerialize(): array
Returns
array

Property Detail

$callable ¶ protected

Type
?Closure

$container ¶ protected

Type
?ContainerInterface

$context ¶ protected

Type
Context

$originalMessage ¶ protected

Type
QueueMessage

$parsedBody ¶ protected

Type
array
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