81 public function add( $name, $default,
$type = self::AUTO ) {
83 $option[
'default'] = $default;
84 $option[
'value'] =
null;
85 $option[
'consumed'] =
false;
87 if (
$type !== self::AUTO ) {
88 $option[
'type'] =
$type;
166 if ( !$force &&
$value === $this->
options[$name][
'default'] ) {
193 if ( $option[
'value'] !==
null ) {
194 return $option[
'value'];
196 return $option[
'default'];
238 foreach ( $names as $name ) {
272 if (
$type !== self::INT &&
$type !== self::FLOAT ) {
273 throw new MWException(
"Option $name is not of type INT or FLOAT" );
292 if ( !
$data[
'consumed'] ) {
293 if ( $all ||
$data[
'value'] !==
null ) {
310 if (
$data[
'value'] !==
null ) {
345 if ( !$optionKeys ) {
349 foreach ( $optionKeys as $name ) {
419 $this->
delete(
$name );
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 WebRequest class encapsulates getting at data passed in the URL or via a POSTed form stripping il...
getIntOrNull( $name)
Fetch an integer value from the input or return null if empty.
getArray( $name, $default=null)
Fetch an array from the input or return $default if it's not set.
getFloat( $name, $default=0.0)
Fetch a floating point value from the input or return $default if not set.
getBool( $name, $default=false)
Fetch a boolean value from the input or return $default if not set.
getInt( $name, $default=0)
Fetch an integer value from the input or return $default if not set.
getText( $name, $default='')
Fetch a text string from the given array or return $default if it's not set.
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 it can be in the form of< username >< more info > e g for bot passwords intended to be added to log contexts Fields it might only if the login was with a bot password it is not rendered in wiki pages or galleries in category pages allow injecting custom HTML after the section Any uses of the hook need to handle escaping see BaseTemplate::getToolbox and BaseTemplate::makeListItem for details on the format of individual items inside of this array or by returning and letting standard HTTP rendering take place modifiable or by returning false and taking over the output $out
Using a hook running we can avoid having all this option specific stuff in our mainline code Using the function We ve cleaned up the code here by removing clumps of infrequently used code and moving them off somewhere else It s much easier for someone working with this code to see what s _really_ going and make changes or fix bugs In we can take all the code that deals with the little used title reversing options(say) and put it in one place. Instead of having little title-reversing if-blocks spread all over the codebase in showAnArticle
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
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)