return false;
}
+ /**
+ * Returns a list of all possible errors returned by the module
+ */
+ public function possibleErrors() {
+ return array();
+ }
/**
* Profiling: total module execution time
'Block a user.'
);
}
+
+ public function possibleErrors() {
+ return array (
+ $this->parseMsg( array( 'missingparam', 'user' ) ),
+ $this->parseMsg( array( 'missingparam', 'token' ) ),
+ $this->parseMsg( array( 'sessionfailure' ) ),
+ $this->parseMsg( array( 'cantblock' ) ),
+ $this->parseMsg( array( 'canthide' ) ),
+ $this->parseMsg( array( 'cantblock-email' ) ),
+ );
+ }
protected function getExamples() {
return array (
$retval['description'] = implode( "\n", (array)$obj->getDescription() );
$retval['version'] = implode( "\n", (array)$obj->getVersion() );
$retval['prefix'] = $obj->getModulePrefix();
+
if ( $obj->isReadMode() )
$retval['readrights'] = '';
if ( $obj->isWriteMode() )
$retval['mustbeposted'] = '';
if ( $obj instanceof ApiQueryGeneratorBase )
$retval['generator'] = '';
+
$allowedParams = $obj->getFinalParams();
if ( !is_array( $allowedParams ) )
return $retval;
+
$retval['parameters'] = array();
$paramDesc = $obj->getFinalParamDescription();
foreach ( $allowedParams as $n => $p )
$retval['parameters'][] = $a;
}
$result->setIndexedTagName( $retval['parameters'], 'param' );
+
+ // Errors
+ $retval['errors'] = $obj->possibleErrors();
+ $result->setIndexedTagName( $retval['errors'], 'error' );
+
return $retval;
}