ParallelCurl icon indicating copy to clipboard operation
ParallelCurl copied to clipboard

Passing a class function name

Open codecowboy opened this issue 11 years ago • 2 comments

If calling this within a class method, How would I reference another class method instead of naming a function using a string?

$parallelcurl->startRequest('http://example.com', <how to call a class method>, array('something'));

codecowboy avatar Jan 27 '14 15:01 codecowboy

Right now you need a regular function that calls the class method, using a class object stored in the cookie data.

petewarden avatar Jan 27 '14 20:01 petewarden

you can use the

function () use syntax

http://stackoverflow.com/questions/1065188/in-php-5-3-0-what-is-the-function-use-identifier

exussum12 avatar Sep 23 '14 09:09 exussum12