r76086 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r76085‎ | r76086 | r76087 >
Date:12:59, 5 November 2010
Author:demon
Status:ok
Tags:
Comment:
Drop silly $_ prefix from 4.x days
Modified paths:
  • /trunk/phase3/includes/WebRequest.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/WebRequest.php
@@ -37,8 +37,13 @@
3838 */
3939 class WebRequest {
4040 protected $data, $headers = array();
41 - private $_response;
4241
 42+ /**
 43+ * Lazy-init response object
 44+ * @var WebResponse
 45+ */
 46+ private $response;
 47+
4348 public function __construct() {
4449 /// @todo Fixme: this preemptive de-quoting can interfere with other web libraries
4550 /// and increases our memory footprint. It would be cleaner to do on
@@ -665,11 +670,11 @@
666671 */
667672 public function response() {
668673 /* Lazy initialization of response object for this request */
669 - if ( !is_object( $this->_response ) ) {
 674+ if ( !is_object( $this->response ) ) {
670675 $class = ( $this instanceof FauxRequest ) ? 'FauxResponse' : 'WebResponse';
671 - $this->_response = new $class();
 676+ $this->response = new $class();
672677 }
673 - return $this->_response;
 678+ return $this->response;
674679 }
675680
676681 /**

Status & tagging log