downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | conferences | my php.net

search for in the

Introduction> <ftp_systype
[edit] Last updated: Fri, 26 Apr 2013

view this page in

Gearman



Introduction> <ftp_systype
[edit] Last updated: Fri, 26 Apr 2013
 
add a note add a note User Contributed Notes Gearman - [3 notes]
up
0
Anonymous
8 days ago
For my previous comment:

this line:
<?php
$worker
->addFunction(new MyClass($test), 'myMethod');
?>

change to:

<?php
$worker
->addFunction($taskName, array(new MyClass(), 'myMethod'));
?>
up
0
spacewalker2002 at ukr dot net
9 days ago
You can use this syntax:

<?php
   $worker
= new GearmanWorker();
  
$worker->addServer();
  
$worker->addFunction(new MyClass($test), 'myMethod');

class
MyClass
{
   public function
__construct($test)
   {
      
$this->test = $test;
   }

   public function
myMethod(GearmanJob $job)
   {
     
// you can access to $this->test;
  
}
}
up
0
jon dot skarpeteig at gmail dot com
8 months ago
Unfortunately there's no manager in the pecl extension. If you want to make use of admin features, check out: http://pear.php.net/package/Net_Gearman which implements the administrative protocol in Manager.php as defined in: http://gearman.org/?id=protocol

 
show source | credits | stats | sitemap | contact | advertising | mirror sites