Last Updated: February 25, 2016
· lastguest

PHP: Chainable cURL Object Oriented API

In my Chainable post :

I got some requests for an example of a pratical use of the method chaining wrapper.

Remember the cURL Object Oriented API Class?

Let's combine them into a
dynamic-chainable-object-oriented-api! ;)

(new Chainable(
      new cURL("")
 )) -> setopt(CURLOPT_HEADER, 0)
    -> exec() -> _get_return($data)
    -> close()

print_r( json_decode( $data ) );

1 Response
Add your response

huh! that explains it I guess. I'll give it a bash and try creating a chainable method on my own and let you know if I have any further confusions. thanks man, appreciate your response. :)

over 1 year ago ·