Go to the documentation of this file.
20 use Psr\Log\LoggerInterface;
21 use Psr\Log\LoggerAwareInterface;
77 $this->lastError =
null;
84 $lname = strtolower(
$name );
85 if ( ( $lname ===
'blpop' || $lname ==
'brpop' )
86 && is_array( $arguments[0] ) && isset( $arguments[1] )
88 $this->pool->resetTimeout(
$conn, $arguments[1] + 1 );
89 } elseif ( $lname ===
'brpoplpush' && isset( $arguments[2] ) ) {
90 $this->pool->resetTimeout(
$conn, $arguments[2] + 1 );
93 $conn->clearLastError();
96 if ( preg_match(
'/^ERR operation not permitted\b/',
$conn->getLastError() ) ) {
97 $this->pool->reauthenticateConnection( $this->
server,
$conn );
98 $conn->clearLastError();
101 "Used automatic re-authentication for method '$name'.",
102 [
'redis_server' => $this->
server ]
105 }
catch ( RedisException
$e ) {
106 $this->pool->resetTimeout(
$conn );
112 $this->pool->resetTimeout(
$conn );
125 $sha1 = sha1( $script );
130 $conn->clearLastError();
136 if ( preg_match(
'/^ERR operation not permitted\b/',
$conn->getLastError() ) ) {
137 $this->pool->reauthenticateConnection(
$server,
$conn );
138 $conn->clearLastError();
141 "Used automatic re-authentication for Lua script '$sha1'.",
146 if ( preg_match(
'/^NOSCRIPT/',
$conn->getLastError() ) ) {
147 $conn->clearLastError();
150 "Used eval() for Lua script '$sha1'.",
155 if (
$conn->getLastError() ) {
156 $this->logger->error(
157 'Lua script error on server "{redis_server}": {lua_error}',
160 'lua_error' =>
$conn->getLastError()
175 return $this->conn ===
$conn;
179 $this->pool->freeConnection( $this->
server, $this->conn );
as see the revision history and available at free of to any person obtaining a copy of this software and associated documentation to deal in the Software without including without limitation the rights to use
Allows to change the fields on the form that will be generated $name
__call( $name, $arguments)
injection txt This is an overview of how MediaWiki makes use of dependency injection The design described here grew from the discussion of RFC T384 The term dependency this means that anything an object needs to operate should be injected from the the object itself should only know narrow no concrete implementation of the logic it relies on The requirement to inject everything typically results in an architecture that based on two main types of and essentially stateless service objects that use other service objects to operate on the value objects As of the beginning MediaWiki is only starting to use the DI approach Much of the code still relies on global state or direct resulting in a highly cyclical dependency which acts as the top level factory for services in MediaWiki which can be used to gain access to default instances of various services MediaWikiServices however also allows new services to be defined and default services to be redefined Services are defined or redefined by providing a callback the instantiator that will return a new instance of the service When it will create an instance of MediaWikiServices and populate it with the services defined in the files listed by thereby bootstrapping the DI framework Per $wgServiceWiringFiles lists includes ServiceWiring php
isConnIdentical(Redis $conn)
RedisConnectionPool $pool
Helper class to manage Redis connections.
div flags Integer display flags(NO_ACTION_LINK, NO_EXTRA_USER_LINKS) 'LogException' returning false will NOT prevent logging $e
luaEval( $script, array $params, $numKeys)
Helper class to handle automatically marking connectons as reusable (via RAII pattern)
setLogger(LoggerInterface $logger)
__construct(RedisConnectionPool $pool, $server, Redis $conn, LoggerInterface $logger)
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 and we might be restricted by PHP settings such as safe mode or open_basedir We cannot assume that the software even has read access anywhere useful Many shared hosts run all users web applications under the same so they can t rely on Unix and must forbid reads to even standard directories like tmp lest users read each others files We cannot assume that the user has the ability to install or run any programs not written as web accessible PHP scripts Since anything that works on cheap shared hosting will work if you have shell or root access MediaWiki s design is based around catering to the lowest common denominator Although we support higher end setups as the way many things work by default is tailored toward shared hosting These defaults are unconventional from the point of view of and they certainly aren t ideal for someone who s installing MediaWiki as MediaWiki does not conform to normal Unix filesystem layout Hopefully we ll offer direct support for standard layouts in the but for now *any change to the location of files is unsupported *Moving things and leaving symlinks will *probably *not break but it is *strongly *advised not to try any more intrusive changes to get MediaWiki to conform more closely to your filesystem hierarchy Any such attempt will almost certainly result in unnecessary bugs The standard recommended location to install relative to the web is it should be possible to enable the appropriate rewrite rules by if you can reconfigure the web server
the array() calling protocol came about after MediaWiki 1.4rc1.