public function _get_first_available_transport($args, $url = null)
{
$request_order = array('Curl', 'Streams');
// Loop over each transport on each HTTP request looking for one which will serve this request's needs
foreach ($request_order as $transport) {
$class = 'NukeViet\\Http\\' . $transport;
// Check to see if this transport is a possibility, calls the transport statically
if (!call_user_func(array($class, 'test'), $args, $url)) {
continue;
}
return $class;
}
return false;
}