Merged in Phergie changes

This commit is contained in:
Luke Fitzgerald
2010-08-03 09:42:02 -07:00
parent 9b9a36e492
commit a3df3b6367
30 changed files with 1546 additions and 719 deletions

View File

@@ -184,7 +184,10 @@ class Phergie_Plugin_Http extends Phergie_Plugin_Abstract
$type = $this->response->getHeaders('content-type');
foreach ($this->handlers as $expr => $handler) {
if (preg_match('#^' . $expr . '$#i', $type)) {
$body = call_user_func($handler, $body);
$handled = call_user_func($handler, $body);
if (!empty($handled)) {
$body = $handled;
}
}
}
@@ -256,7 +259,7 @@ class Phergie_Plugin_Http extends Phergie_Plugin_Abstract
public function post($url, array $query = array(),
array $post = array(), array $context = array()
) {
if (!empty($params)) {
if (!empty($query)) {
$url .= '?' . http_build_query($query);
}
@@ -278,4 +281,4 @@ class Phergie_Plugin_Http extends Phergie_Plugin_Abstract
return $this->request($url, $context);
}
}
}