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 LimitAttemptsExtension

Namespace: Cake\Queue\Consumption

Constants

  • string
    ATTEMPTS_PROPERTY ¶
    'attempts'

    The property key used to set the number of times a message was attempted.

Property Summary

  • $_eventClass protected
    string

    Default class name for new event objects.

  • $_eventManager protected
    Cake\Event\EventManagerInterface|null

    Instance of the Cake\Event\EventManager this object is using to dispatch inner events.

  • $maxAttempts protected
    int|null

    The maximum number of times a job may be attempted. $maxAttempts defined on a Job will override this value.

Method Summary

  • __construct() public
  • dispatchEvent() public

    Wrapper for creating and dispatching events.

  • getEventManager() public

    Returns the Cake\Event\EventManager manager instance for this object.

  • onResult() public

    Executed when a message is processed by a processor or a result was set in onMessageReceived extension method. BEFORE the message status was sent to the broker The result could be changed at this point.

  • setEventManager() public

    Returns the Cake\Event\EventManagerInterface instance for this object.

Method Detail

__construct() ¶ public

__construct(int|null $maxAttempts = null): void
Parameters
int|null $maxAttempts optional

The maximum number of times a job may be attempted.

Returns
void

dispatchEvent() ¶ public

dispatchEvent(string $name, array $data = [], TSubject|null $subject = null): Cake\Event\EventInterface<TSubject>

Wrapper for creating and dispatching events.

Returns a dispatched event.

Parameters
string $name

Name of the event.

array $data optional

Any value you wish to be transported with this event to it can be read by listeners.

TSubject|null $subject optional

The object that this event applies to ($this by default).

Returns
Cake\Event\EventInterface<TSubject>

getEventManager() ¶ public

getEventManager(): Cake\Event\EventManagerInterface

Returns the Cake\Event\EventManager manager instance for this object.

You can use this instance to register any new listeners or callbacks to the object events, or create your own events and trigger them at will.

Returns
Cake\Event\EventManagerInterface

onResult() ¶ public

onResult(MessageResult $context): void

Executed when a message is processed by a processor or a result was set in onMessageReceived extension method. BEFORE the message status was sent to the broker The result could be changed at this point.

Parameters
MessageResult $context

The result of the message after it was processed.

Returns
void

setEventManager() ¶ public

setEventManager(Cake\Event\EventManagerInterface $eventManager): $this

Returns the Cake\Event\EventManagerInterface instance for this object.

You can use this instance to register any new listeners or callbacks to the object events, or create your own events and trigger them at will.

Parameters
Cake\Event\EventManagerInterface $eventManager

the eventManager to set

Returns
$this

Property Detail

$_eventClass ¶ protected

Default class name for new event objects.

Type
string

$_eventManager ¶ protected

Instance of the Cake\Event\EventManager this object is using to dispatch inner events.

Type
Cake\Event\EventManagerInterface|null

$maxAttempts ¶ protected

The maximum number of times a job may be attempted. $maxAttempts defined on a Job will override this value.

Type
int|null
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