r95975 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r95974‎ | r95975 | r95976 >
Date:13:02, 1 September 2011
Author:catrope
Status:resolved
Tags:
Comment:
Add ResourceLoaderContext::newDummyContext() function
Modified paths:
  • /trunk/phase3/includes/resourceloader/ResourceLoaderContext.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/resourceloader/ResourceLoaderContext.php
@@ -97,6 +97,13 @@
9898 }
9999 return $retval;
100100 }
 101+
 102+ /**
 103+ * Return a dummy ResourceLoaderContext object suitable for passing into things that don't "really" need a context
 104+ */
 105+ public static function newDummyContext() {
 106+ return new self( null, new FauxRequest( array() ) );
 107+ }
101108
102109 /**
103110 * @return ResourceLoader

Follow-up revisions

RevisionCommit summaryAuthorDate
r95977Remove type hint that broke r95975catrope13:07, 1 September 2011

Status & tagging log