Kernel Events¶
GearmanBundle transforms Gearman callbacks to Symfony2 kernel events.
Complete Callback¶
This event receives as a parameter an instance of MmoreramGearmanBundleEventGearmanClientCallbackCompleteEvent with one method $event->getGearmanTask(). This method returns an instance of GearmanTask. For more information about this GearmanEvent, read [GearmanClient::setCompleteCallback](http://www.php.net/manual/en/gearmanclient.setcompletecallback.php) documentation.
services:
my_event_listener:
class: AcmeBundle\EventListener\MyEventListener
tags:
- { name: kernel.event_listener, event: gearman.client.callback.complete, method: onComplete }
Created Callback¶
This event receives as a parameter an instance of MmoreramGearmanBundleEventGearmanClientCallbackCreatedEvent with one method $event->getGearmanTask(). This method returns an instance of GearmanTask. For more information about this GearmanEvent, read [GearmanClient::setCreatedCallback](http://www.php.net/manual/en/gearmanclient.setcreatedcallback.php) documentation.
services:
my_event_listener:
class: AcmeBundle\EventListener\MyEventListener
tags:
- { name: kernel.event_listener, event: gearman.client.callback.created, method: onCreated }
Data Callback¶
This event receives as a parameter an instance of MmoreramGearmanBundleEventGearmanClientCallbackDataEvent with one method $event->getGearmanTask(). This method returns an instance of GearmanTask. For more information about this GearmanEvent, read [GearmanClient::setDataCallback](http://www.php.net/manual/en/gearmanclient.setdatacallback.php) documentation.
services:
my_event_listener:
class: AcmeBundle\EventListener\MyEventListener
tags:
- { name: kernel.event_listener, event: gearman.client.callback.data, method: onData }
Exception Callback¶
This event receives as a parameter an instance of MmoreramGearmanBundleEventGearmanClientCallbackExceptionEvent with no methods. For more information about this GearmanEvent, read [GearmanClient::setExceptionCallback](http://www.php.net/manual/en/gearmanclient.setexceptioncallback.php) documentation.
services:
my_event_listener:
class: AcmeBundle\EventListener\MyEventListener
tags:
- { name: kernel.event_listener, event: gearman.client.callback.exception, method: onExcept }
Fail Callback¶
This event receives as a parameter an instance of MmoreramGearmanBundleEventGearmanClientCallbackFailEvent with one method $event->getGearmanTask(). This method returns an instance of GearmanTask. For more information about this GearmanEvent, read [GearmanClient::setFailCallback](http://www.php.net/manual/en/gearmanclient.setfailcallback.php) documentation.
services:
my_event_listener:
class: AcmeBundle\EventListener\MyEventListener
tags:
- { name: kernel.event_listener, event: gearman.client.callback.fail, method: onFail }
Status Callback¶
This event receives as a parameter an instance of MmoreramGearmanBundleEventGearmanClientCallbackStatusEvent with one method $event->getGearmanTask(). This method returns an instance of GearmanTask. For more information about this GearmanEvent, read [GearmanClient::setStatusCallback](http://www.php.net/manual/en/gearmanclient.setstatuscallback.php) documentation.
services:
my_event_listener:
class: AcmeBundle\EventListener\MyEventListener
tags:
- { name: kernel.event_listener, event: gearman.client.callback.status, method: onStatus }
Warning Callback¶
This event receives as parameter an instance of MmoreramGearmanBundleEventGearmanClientCallbackWarningEvent with one method $event->getGearmanTask(). This method returns an instance of GearmanTask. For more information about this GearmanEvent, read [GearmanClient::setWarningCallback](http://www.php.net/manual/en/gearmanclient.setwarningcallback.php) documentation.
services:
my_event_listener:
class: AcmeBundle\EventListener\MyEventListener
tags:
- { name: kernel.event_listener, event: gearman.client.callback.warning, method: onWarning }
Workload Callback¶
This event receives as parameter an instance of MmoreramGearmanBundleEventGearmanClientCallbackWorkloadEvent with one method $event->getGearmanTask(). This method returns an instance of GearmanTask. For more information about this GearmanEvent, read [GearmanClient::setWorkloadCallback](http://www.php.net/manual/en/gearmanclient.setworkloadcallback.php) documentation.
services:
my_event_listener:
class: AcmeBundle\EventListener\MyEventListener
tags:
- { name: kernel.event_listener, event: gearman.client.callback.workload, method: onWorkload }