41 protected $skin = self::INHERIT_VALUE;
42 protected $user = self::INHERIT_VALUE;
43 protected $debug = self::INHERIT_VALUE;
44 protected $only = self::INHERIT_VALUE;
46 protected $raw = self::INHERIT_VALUE;
53 if ( $this->modules === self::INHERIT_VALUE ) {
54 return $this->context->getModules();
67 if ( $this->language === self::INHERIT_VALUE ) {
68 return $this->context->getLanguage();
79 $this->direction = null;
84 if ( $this->direction === self::INHERIT_VALUE ) {
85 return $this->context->getDirection();
87 if ( $this->direction === null ) {
102 if ( $this->
skin === self::INHERIT_VALUE ) {
103 return $this->context->getSkin();
117 if ( $this->
user === self::INHERIT_VALUE ) {
118 return $this->context->getUser();
129 $this->userObj = null;
133 if ( $this->debug === self::INHERIT_VALUE ) {
134 return $this->context->getDebug();
148 if ( $this->only === self::INHERIT_VALUE ) {
149 return $this->context->getOnly();
163 if ( $this->
version === self::INHERIT_VALUE ) {
164 return $this->context->getVersion();
178 if ( $this->raw === self::INHERIT_VALUE ) {
179 return $this->context->getRaw();
192 return $this->context->getRequest();
196 return $this->context->getResourceLoader();
the array() calling protocol came about after MediaWiki 1.4rc1.
setModules(array $modules)
Allows changing specific properties of a context object, without changing the main one...
__construct(ResourceLoaderContext $context)
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 user
Wikitext formatted, in the key only.
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
static factory($code)
Get a cached or new language object for a given language code.
this class mediates it Skin Encapsulates a look and feel for the wiki All of the functions that render HTML and make choices about how to render it are here and are called from various other places when and is meant to be subclassed with other skins that may override some of its functions The User object contains a reference to a skin(according to that user's preference)
ResourceLoaderContext $context
Object passed around to modules which contains information about the state of a specific loader reque...