MediaWiki REL1_34
PresenceBooleanDef.php
Go to the documentation of this file.
1<?php
2
4
6
20
21 public function getValue( $name, array $settings, array $options ) {
22 return $this->callbacks->hasParam( $name, $options );
23 }
24
25 public function validate( $name, $value, array $settings, array $options ) {
26 return (bool)$value;
27 }
28
29 public function describeSettings( $name, array $settings, array $options ) {
30 $info = parent::describeSettings( $name, $settings, $options );
31 unset( $info['default'] );
32 return $info;
33 }
34
35}
Type definition for checkbox-like boolean types.
getValue( $name, array $settings, array $options)
Get the value from the request.
describeSettings( $name, array $settings, array $options)
"Describe" a settings array
validate( $name, $value, array $settings, array $options)
Validate the value.
Base definition for ParamValidator types.
Definition TypeDef.php:15