Hi,
I have to integrate Gearman in a zf2 project. I have made some search and I
found a zf2 module for this (https://github.com/mwillbanks/MwGearman). Did
anybody used this module?
I have some problem with it.
The problem is that I want to use it in a controller and this is how you
register a worker function:

$gearman->register('myJob', 'handleJob');

This would work with scripts but not with classes because I have to
transmit $this too. I have locked into the code of the module and I have
found out that I can use an array($this,'function') instead of 'handleJob'
but this does not work because Gearman worker register function does accept
only string as you can see in the documentation:
http://www.php.net/manual/en/gearmanworker.register.php

Can anybody help me? How can I use this module in a controller?

Regards,
Norbert.

Reply via email to