'ChangesListInitRows': Batch process change list rows prior to rendering.
$changesList: ChangesList instance
-$rows: The data that will be rendered. May be a ResultWrapper instance or
- an array.
+$rows: The data that will be rendered. May be a \Wikimedia\Rdbms\IResultWrapper
+ instance or an array.
'ChangesListInsertArticleLink': Override or augment link to article in RC list.
&$changesList: ChangesList instance.
namespace MediaWiki;
+/**
+ * @since 1.29
+ */
class HeaderCallback {
private static $headersSentException;
private static $messageSent = false;
* Register a callback to be called when headers are sent. There can only
* be one of these handlers active, so all relevant actions have to be in
* here.
+ *
+ * @since 1.29
*/
public static function register() {
header_register_callback( [ __CLASS__, 'callback' ] );
/**
* The callback, which is called by the transport
+ *
+ * @since 1.29
*/
public static function callback() {
// Prevent caching of responses with cookies (T127993)
/**
* Log a warning message if headers have already been sent. This can be
* called before flushing the output.
+ *
+ * @since 1.29
*/
public static function warnIfHeadersSent() {
if ( headers_sent() && !self::$messageSent ) {
* @ingroup Parser
*/
class MagicWordArray {
- /** @var array */
+ /** @var string[] */
public $names = [];
/** @var MagicWordFactory */
private $regex;
/**
- * @param array $names
+ * @param string[] $names
* @param MagicWordFactory|null $factory
*/
public function __construct( $names = [], MagicWordFactory $factory = null ) {
/**
* Add a number of magic words by name
*
- * @param array $names
+ * @param string[] $names
*/
public function addArray( $names ) {
$this->names = array_merge( $this->names, array_values( $names ) );
/**
* Get the base regex
- * @return array
+ * @return string[]
*/
public function getBaseRegex() {
if ( is_null( $this->baseRegex ) ) {
/**
* Get an unanchored regex that does not match parameters
- * @return array
+ * @return string[]
*/
public function getRegex() {
if ( is_null( $this->regex ) ) {
/**
* Get a regex for matching variables with parameters
*
- * @return string
+ * @return string[]
*/
public function getVariableRegex() {
return str_replace( "\\$1", "(.*?)", $this->getRegex() );
/**
* Get a regex anchored to the start of the string that does not match parameters
*
- * @return array
+ * @return string[]
*/
public function getRegexStart() {
$base = $this->getBaseRegex();
/**
* Get an anchored regex for matching variables with parameters
*
- * @return array
+ * @return string[]
*/
public function getVariableStartToEndRegex() {
$base = $this->getBaseRegex();
/**
* @since 1.20
- * @return array
+ * @return string[]
*/
public function getNames() {
return $this->names;
*/
use MediaWiki\Linker\LinkRenderer;
use MediaWiki\MediaWikiServices;
-use Wikimedia\Rdbms\ResultWrapper;
+use Wikimedia\Rdbms\IResultWrapper;
class ChangesList extends ContextSource {
const CSS_CLASS_PREFIX = 'mw-changeslist-';
}
/**
- * @param ResultWrapper|array $rows
+ * @param IResultWrapper|array $rows
*/
public function initChangesListRows( $rows ) {
Hooks::run( 'ChangesListInitRows', [ $this, $rows ] );
/** @var array */
protected $foreignInfo;
- /** @var ProcessCacheLRU */
+ /** @var MapCacheLRU */
protected $cache;
/** Maximum number of cache items */
/** @var JobQueueGroup[] */
protected static $instances = [];
- /** @var ProcessCacheLRU */
+ /** @var MapCacheLRU */
protected $cache;
/** @var string Wiki domain ID */
/** @var BagOStuff */
protected $srvCache;
- /** @var ProcessCacheLRU Container stat cache */
+ /** @var MapCacheLRU Container stat cache */
protected $containerStatCache;
/** @var array */