Exemplo n.º 1
0
 /**
  * Create a new Zend_Http_Response object from a string
  *
  * @param string $response_str
  * @return Zend_Http_Response
  */
 public static function fromString($response_str, $curl = false)
 {
     self::$curl = $curl;
     $code = self::extractCode($response_str);
     $headers = self::extractHeaders($response_str);
     $body = self::extractBody($response_str);
     $version = self::extractVersion($response_str);
     $message = self::extractMessage($response_str);
     return new Zend_Http_Response($code, $headers, $body, $version, $message);
 }