CakePHP
  • 文档
    • 书籍
    • API
    • 视频
    • 报告安全问题
    • 隐私政策
    • 标志 & 商标
  • 商业解决方案
  • 纪念品
  • 公路旅行
  • 团队
  • 社区
    • 社区
    • 参与
    • 问题 (Github)
    • 烘焙坊
    • 特色资源
    • 培训
    • 聚会
    • 我的 CakePHP
    • CakeFest
    • 通讯
    • 领英
    • YouTube
    • Facebook
    • Twitter
    • Mastodon
    • 帮助 & 支持
    • 论坛
    • Stack Overflow
    • IRC
    • Slack
    • 付费支持
CakePHP

C Queue 2.x API

  • 项目
    • Queue
      • CakePHP
      • Chronos
      • Elastic Search
      • Queue
  • 版本
    • 2.x
      • 2.x
      • 1.x

命名空间

  • Cake\Queue
    • Command
    • Consumption
    • Job
    • Listener
    • Mailer
    • Model
    • Queue

类 Message

命名空间: Cake\Queue\Job

属性摘要

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

方法摘要

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

    获取包含任务中可调用函数的闭包。

  • getContext() public
  • getMaxAttempts() public

    任务允许的最大尝试次数。

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

    获取目标类和方法。

  • jsonSerialize() public

方法详情

__construct() ¶ public

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

队列消息。

Interop\Queue\Context $context

上下文。

Cake\Core\ContainerInterface|null $container optional

DI 容器实例

__toString() ¶ public

__toString(): string
返回值
string

getArgument() ¶ public

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

键

mixed $default optional

默认值。

返回值
mixed

getCallable() ¶ public

getCallable(): Closure

获取包含任务中可调用函数的闭包。

支持的可调用函数包括

  • [class, method] 数组。该类将使用无构造函数参数进行构造。
返回值
闭包

getContext() ¶ public

getContext(): Interop\Queue\Context
返回值
Interop\Queue\Context

getMaxAttempts() ¶ public

getMaxAttempts(): int|null

任务允许的最大尝试次数。

返回值
int|null

getOriginalMessage() ¶ public

getOriginalMessage(): Interop\Queue\Message
返回值
Interop\Queue\Message

getParsedBody() ¶ public

getParsedBody(): array
返回值
array

getTarget() ¶ public

getTarget(): array{string, string}

获取目标类和方法。

返回值
array{string, string}

jsonSerialize() ¶ public

jsonSerialize(): array
返回值
array

属性详情

$callable ¶ protected

类型
?Closure

$container ¶ protected

类型
?ContainerInterface

$context ¶ protected

类型
Context

$originalMessage ¶ protected

类型
QueueMessage

$parsedBody ¶ protected

类型
array
OpenHub
Pingping
Linode
  • 商业解决方案
  • 展示
  • 文档
  • 书籍
  • API
  • 视频
  • 报告安全问题
  • 隐私政策
  • 标志 & 商标
  • 社区
  • 参与
  • 问题 (Github)
  • 烘焙坊
  • 特色资源
  • 培训
  • 聚会
  • 我的 CakePHP
  • CakeFest
  • 通讯
  • 领英
  • YouTube
  • Facebook
  • Twitter
  • Mastodon
  • 帮助 & 支持
  • 论坛
  • Stack Overflow
  • IRC
  • Slack
  • 付费支持

使用 CakePHP API Docs 生成