153 return $info[
'type'] !==
'null';
159 foreach ( $fields as $field => $info ) {
164 if ( $info[
'type'] ===
'checkbox' || $info[
'type'] ===
'button' ) {
167 if ( !$this->$field && empty( $info[
'optional'] ) ) {
174 if ( !
isset(
$data[$field] ) && $info[
'type'] ===
'multiselect' ) {
181 if (
$data[$field] ===
'' ||
$data[$field] === [] ) {
182 if ( empty( $info[
'optional'] ) ) {
186 switch ( $info[
'type'] ) {
188 if ( !
isset( $info[
'options'][
$data[$field]] ) ) {
240 return $req->loadFromSubmission(
$data );
255 if ( $allowSubclasses ) {
276 foreach ( $reqs as
$req ) {
277 $info =
$req->getFieldInfo();
285 .
"$requestClass::\$username vs. \"$username\" from $otherClass::\$username" );
305 $sharedRequiredPrimaryFields =
array_reduce( $primaryRequests,
function ( $shared,
$req ) {
307 return empty(
$options[
'optional'] );
309 if ( $shared ===
null ) {
316 foreach ( $reqs as
$req ) {
317 $info =
$req->getFieldInfo();
322 foreach ( $info as $name =>
$options ) {
325 $req->required === self::OPTIONAL
328 ||
$req->required === self::PRIMARY_REQUIRED
329 && !in_array( $name, $sharedRequiredPrimaryFields,
true )
342 "\"{$merged[$name]['type']}\" vs \"{$options['type']}\""
346 if (
isset( $merged[$name][
'options'] ) ) {
375 foreach (
$data as $k => $v ) {
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
The Message class provides methods which fulfil two basic services:
this hook is for auditing only $req
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped & $options
this hook is for auditing only or null if authentication failed before getting that far or null if we can t even determine that When $user is not null
null means default in associative array with keys and values unescaped Should be merged with default with a value of false meaning to suppress the attribute in associative array with keys and values unescaped noclasses & $ret
Allows to change the fields on the form that will be generated are created Can be used to omit specific feeds from being outputted You must not use this hook to add use OutputPage::addFeedLink() instead. & $feedLinks hooks can tweak the array to change how login etc forms should look $requests
Allows to change the fields on the form that will be generated $name
$data
Utility to generate mapping file used in mw.Title (phpCharToUpper.json)
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 function
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))