From 1a2b825f45bde593b74c659f837e6da05095727c Mon Sep 17 00:00:00 2001 From: "Mark A. Hershberger" Date: Wed, 20 Oct 2010 02:50:36 +0000 Subject: [PATCH] =?utf8?q?follow=20up=20r75046=20=E2=80=94=20Add=20getStat?= =?utf8?q?us()=20method=20to=20HttpRequest?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- includes/HttpFunctions.php | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/includes/HttpFunctions.php b/includes/HttpFunctions.php index 0dccebbd97..5ba2b8db19 100644 --- a/includes/HttpFunctions.php +++ b/includes/HttpFunctions.php @@ -402,6 +402,19 @@ class HttpRequest { } } + /** + * Get the member variable status for an HTTP Request + * + * @return Integer + */ + public function getStatus() { + if ( !$this->respHeaders ) { + $this->parseHeader(); + } + + return (int)$this->respStatus; + } + /** * Returns true if the last status code was a redirect. -- 2.20.1