* This is useful for the namespace selector.
*/
const INTNULL = 3;
+ /** Array type, maps guessType() to WebRequest::getArray()
+ * @since 1.29 */
+ const ARR = 5;
/* @} */
/**
return self::FLOAT;
} elseif ( is_string( $data ) ) {
return self::STRING;
+ } elseif ( is_array( $data ) ) {
+ return self::ARR;
} else {
throw new MWException( 'Unsupported datatype' );
}
/**
* @see validateBounds()
+ * @param string $name
+ * @param int $min
+ * @param int $max
*/
public function validateIntBounds( $name, $min, $max ) {
$this->validateBounds( $name, $min, $max );
case self::INTNULL:
$value = $r->getIntOrNull( $name );
break;
+ case self::ARR:
+ $value = $r->getArray( $name );
+ break;
default:
throw new MWException( 'Unsupported datatype' );
}
/** @name ArrayAccess functions
* These functions implement the ArrayAccess PHP interface.
- * @see http://php.net/manual/en/class.arrayaccess.php
+ * @see https://secure.php.net/manual/en/class.arrayaccess.php
*/
/* @{ */
/**