Export to GitHub

rolling-curl - issue #19

It would be nice to can use as callback class method.


Posted on Mar 1, 2011 by Massive Rabbit

It would be nice to can use as callback class method. It is quite easy to implement.

class RollingCurl { ... function __construct($callback = null, $instance = null) { $this->instance = $instance; $this->callback = $callback; } }

and then call it like this:

if($instance){ $this->instance->$callback; } else if(is_callable($callback)){ call_user_func($callback,...); }

thank you.

Comment #1

Posted on Mar 1, 2011 by Massive Rabbit

Sorry for bothering you. It alredy do the call_user_func(). I should read manual before posting.

Status: New

Labels:
Type-Defect Priority-Medium