substr( $_SERVER['PATH_INFO'], 1 );
}
}
+
+ private $_response;
/**
* Recursively strips slashes from the given array;
wfDebug( "WebRequest::getFileName() '" . $_FILES[$key]['name'] . "' normalized to '$name'\n" );
return $name;
}
+
+ /**
+ * Return a handle to WebResponse style object, for setting cookies,
+ * headers and other stuff, for Request being worked on.
+ */
+ function response() {
+ /* Lazy initialization of response object for this request */
+ if (!is_object($this->_response)) {
+ $this->_response = new WebResponse;
+ }
+ return $this->_response;
+ }
+
}
/**
if( is_array( $data ) ) {
$this->data = $data;
} else {
- wfDebugDieBacktrace( "FauxRequest() got bogus data" );
+ throw new MWException( "FauxRequest() got bogus data" );
}
$this->wasPosted = $wasPosted;
}
}
function getRequestURL() {
- wfDebugDieBacktrace( 'FauxRequest::getRequestURL() not implemented' );
+ throw new MWException( 'FauxRequest::getRequestURL() not implemented' );
}
function appendQuery( $query ) {
- wfDebugDieBacktrace( 'FauxRequest::appendQuery() not implemented' );
+ throw new MWException( 'FauxRequest::appendQuery() not implemented' );
}
}