/**
* Die if none or more than one of a certain set of parameters is set and not false.
- * @param array $params Array of parameter names
+ *
+ * Call getRequireOnlyOneParameterErrorMessages() to get a list of possible errors.
+ *
+ * @param array $params User provided set of parameters, as from $this->extractRequestParams()
+ * @param string $required,... Names of parameters of which exactly one must be set
*/
- public function requireOnlyOneParameter( $params ) {
+ public function requireOnlyOneParameter( $params, $required /*...*/ ) {
$required = func_get_args();
array_shift( $required );
$p = $this->getModulePrefix();
/**
* Die if more than one of a certain set of parameters is set and not false.
*
- * @param array $params
+ * Call getRequireMaxOneParameterErrorMessages() to get a list of possible errors.
+ *
+ * @param array $params User provided set of parameters, as from $this->extractRequestParams()
+ * @param string $required,... Names of parameters of which at most one must be set
*/
- public function requireMaxOneParameter( $params ) {
+ public function requireMaxOneParameter( $params, $required /*...*/ ) {
$required = func_get_args();
array_shift( $required );
$p = $this->getModulePrefix();
/**
* Die if none of a certain set of parameters is set and not false.
*
+ * Call getRequireAtLeastOneParameterErrorMessages() to get a list of possible errors.
+ *
* @since 1.23
- * @param array $params User provided set of parameters
- * @param string ... List of parameter names to check
+ * @param array $params User provided set of parameters, as from $this->extractRequestParams()
+ * @param string $required,... Names of parameters of which at least one must be set
*/
- public function requireAtLeastOneParameter( $params ) {
+ public function requireAtLeastOneParameter( $params, $required /*...*/ ) {
$required = func_get_args();
array_shift( $required );
$p = $this->getModulePrefix();
}
/**
+ * Get a WikiPage object from a title or pageid param, if possible.
+ * Can die, if no param is set or if the title or page id is not valid.
+ *
+ * Call getTitleOrPageIdErrorMessage() to get a list of possible errors.
+ *
* @param array $params
* @param bool|string $load Whether load the object's state from the database:
* - false: don't load (if the pageid is given, it will still be loaded)
}
/**
+ * Generates the possible error getTitleOrPageId() can die with
+ *
* @return array
*/
public function getTitleOrPageIdErrorMessage() {