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
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
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
getTarget() ¶ public
getTarget(): array{string, string}
Get the target class and method.
Returns
array{string, string}