UnionOfRAD/lithium — Issue #355: curl_getinfo() would be nice to have.
Author: housni
Created: 2012-02-22 20:51:38+00:00
State: open

I use cURL a lot and often, I need to know the status of a transfer.

For that purpose, I use `curl_getinfo()` which requires a handle returned by `curl_init()` as it's first parameter.
See: http://www.php.net/manual/en/function.curl-getinfo.php

I see that `\lithium\net\socket\Curl::open()` returns `$this->_resource` which is the result of a `curl_init()`.

It's not essential but would be nice to have a method named `info()`, or something along those lines, that did something like this:

if (!is_resource($this->_resource)) {
return false;
}

return curl_getinfo($this->_resource);

Also, would be nice if you could also allow us to pass `$options` into the method that can be passed in as the second array parameter for `curl_getinfo()`.

PS: Even in it's pre-1.0 state, Lithium beats all the other frameworks, hands down. Keep up the great work!