Go to the documentation of this file.
48 static $instance =
null;
50 $instance =
new self();
63 $this->deltas[$key] = isset( $this->deltas[$key] ) ? $this->deltas[$key] : 0;
64 $this->deltas[$key] +=
$count;
65 if ( PHP_SAPI ===
'cli' ) {
75 public function flush() {
78 $deltas = array_filter( $this->deltas );
79 if ( $wgStatsMethod ===
'udp' ) {
81 } elseif ( $wgStatsMethod ===
'cache' ) {
86 $this->deltas =
array();
94 global $wgUDPProfilerHost, $wgUDPProfilerPort, $wgAggregateStatsID,
97 $id = strlen( $wgAggregateStatsID ) ? $wgAggregateStatsID :
wfWikiID();
101 $lines[] = sprintf( $wgStatsFormatString, $id,
$count, $key );
105 static $socket =
null;
107 $socket = socket_create( AF_INET, SOCK_DGRAM, SOL_UDP );
112 if ( ( strlen( $packet ) + strlen(
$line ) ) > 1450 ) {
113 $packets[] = $packet;
118 if ( $packet !=
'' ) {
119 $packets[] = $packet;
121 foreach ( $packets
as $packet ) {
sendDeltasMemc(array $deltas)
skin txt MediaWiki includes four core it has been set as the default in MediaWiki since the replacing Monobook it had been been the default skin since before being replaced by Vector largely rewritten in while keeping its appearance Several legacy skins were removed in the as the burden of supporting them became too heavy to bear Those in etc for skin dependent CSS etc for skin dependent JavaScript These can also be customised on a per user by etc This feature has led to a wide variety of user styles becoming that gallery is a good place to ending in php
globals will be eliminated from MediaWiki replaced by an application object which would be passed to constructors Whether that would be an convenient solution remains to be but certainly PHP makes such object oriented programming models easier than they were in previous versions For the time being MediaWiki programmers will have to work in an environment with some global context At the time of globals were initialised on startup by MediaWiki of these were configuration which are documented in DefaultSettings php There is no comprehensive documentation for the remaining however some of the most important ones are listed below They are typically initialised either in index php or in Setup php For a description of the see design txt $wgTitle Title object created from the request URL $wgOut OutputPage object for HTTP response $wgUser User object for the user associated with the current request $wgLang Language object selected by user preferences $wgContLang Language object associated with the wiki being viewed $wgParser Parser object Parser extensions register their hooks here $wgRequest WebRequest to get request data $wgMemc
wfSuppressWarnings( $end=false)
Reference-counted warning suppression.
incr( $key, $count=1)
Increment a key by delta $count.
flush()
Flush all pending deltas to persistent storage.
wfMemcKey()
Get a cache key.
wfRestoreWarnings()
Restore error level to previous value.
the array() calling protocol came about after MediaWiki 1.4rc1.
List of Api Query prop modules.
when a variable name is used in a it is silently declared as a new masking the global
Aggregator for wfIncrStats() that batches updates per request.
wfWikiID()
Get an ASCII string identifying this wiki This is used as a prefix in memcached keys.
sendDeltasUDP(array $deltas)
This document is intended to provide useful advice for parties seeking to redistribute MediaWiki to end users It s targeted particularly at maintainers for Linux since it s been observed that distribution packages of MediaWiki often break We ve consistently had to recommend that users seeking support use official tarballs instead of their distribution s and this often solves whatever problem the user is having It would be nice if this could such as