/**
* @see Action::execute()
- * @throws ErrorPageError
+ *
* @param $data array|null
* @param $captureErrors bool
+ * @throws ErrorPageError|Exception
* @return bool
*/
public function execute( array $data = null, $captureErrors = true ) {
* forms, they probably won't have any data, but some (eg rollback) may do
* @param $data Array values that would normally be in the GET request
* @param $captureErrors Bool whether to catch exceptions and just return false
- * @throws ErrorPageError
+ * @throws ErrorPageError|Exception
* @return Bool whether execution was successful
*/
public function execute( array $data = null, $captureErrors = true ) {
* @param $event String: event name
* @param $args Array: parameters passed to hook functions
*
+ * @throws MWException
+ * @throws FatalError
* @return Boolean True if no handler aborted the hook
*/
public static function run( $event, $args = array() ) {
* Constructor
*
* @param $page WikiPage Page we are updating
+ * @throws MWException
*/
function __construct( WikiPage $page ) {
parent::__construct( false ); // no implicit transaction
/**
* Get the page's content model id, see the CONTENT_MODEL_XXX constants.
*
+ * @throws MWException
* @return String: Content model id
*/
public function getContentModel() {
* What is the page_latest field for this page?
*
* @param $flags Int a bit field; may be Title::GAID_FOR_UPDATE to select for update
+ * @throws MWException
* @return Int or 0 if the page doesn't exist
*/
public function getLatestRevID( $flags = 0 ) {
* so it is still advisable to make the call conditional on isLoggedIn(),
* and to commit the transaction after calling.
*
+ * @throws MWException
* @return Status
*/
public function addToDatabase() {
* @param $minorEdit bool
* @param $oldid int Revision ID
* @param $watchers array of user IDs
+ * @param string $pageStatus
+ * @throws MWException
*/
public function actuallyNotifyOnPageChange( $editor, $title, $timestamp, $summary, $minorEdit,
$oldid, $watchers, $pageStatus = 'changed' ) {
*
* @since 1.19
*
+ * @throws MWException
* @return String
*/
protected function getRawIP() {
* @param $text String: new text of the section
* @param $sectionTitle String: new section's subject, only if $section is 'new'
* @param $edittime String: revision timestamp or null to use the current revision
+ * @throws MWException
* @return String new complete article text, or null if error
*
* @deprecated since 1.21, use replaceSectionContent() instead
* @param $sectionTitle String: new section's subject, only if $section is 'new'
* @param $edittime String: revision timestamp or null to use the current revision
*
+ * @throws MWException
* @return Content new complete article content, or null if error
*
* @since 1.21
* edit-already-exists error will be returned. These two conditions are also possible with
* auto-detection due to MediaWiki's performance-optimised locking strategy.
*
- * @param $baseRevId the revision ID this edit was based off, if any
+ * @param bool|\the $baseRevId the revision ID this edit was based off, if any
* @param $user User the user doing the edit
* @param $serialisation_format String: format for storing the content in the database
*
+ * @throws MWException
* @return Status object. Possible errors:
* edit-hook-aborted: The ArticleSave hook aborted the edit but didn't set the fatal flag of $status
* edit-gone-missing: In update mode, but the article didn't exist
* or false if populating empty cache fails. Also returns true if MessageCache
* is disabled.
*
- * @param $code String: language to which load messages
+ * @param bool|String $code String: language to which load messages
+ * @throws MWException
* @return bool
*/
function load( $code = false ) {
* @param $format null|string the format to use for deserialization. If not
* given, the model's default format is used.
*
+ * @throws MWException
* @return Content a Content object representing $text
*
* @throw MWException if $model or $format is not supported or if $text can
* Closes a database connection.
* if it is open : commits any open transactions
*
+ * @throws MWException
* @return Bool operation success. true if already closed.
*/
public function close() {
* generated dynamically using $filename
* @param bool|callable $inputCallback Callback: Optional function called for each complete line sent
* @throws MWException
+ * @throws Exception|MWException
* @return bool|string
*/
public function sourceFile(
/**
* Get an authenticated connection handle to the Swift proxy
*
- * @return CF_Connection|bool False on failure
* @throws CloudFilesException
+ * @throws CloudFilesException|Exception
+ * @return CF_Connection|bool False on failure
*/
protected function getConnection() {
if ( $this->connException instanceof CloudFilesException ) {
*
* @param $jobs array List of Jobs
* @param $flags integer Bitfield (supports JobQueue::QoS_Atomic)
+ * @throws MWException
* @return bool
*/
final public function batchPush( array $jobs, $flags = 0 ) {
* Acknowledge that a job was completed
*
* @param $job Job
+ * @throws MWException
* @return bool
*/
final public function ack( Job $job ) {
* previous "root job" for the same task of "update links of pages that use template X".
*
* @param $job Job
+ * @throws MWException
* @return bool
*/
final public function deduplicateRootJob( Job $job ) {
/**
* @see JobQueue::doBatchPush()
+ * @param array $jobs
+ * @param $flags
+ * @throws DBError|Exception
* @return bool
*/
protected function doBatchPush( array $jobs, $flags ) {
/**
* @see JobQueue::doAck()
+ * @param Job $job
+ * @throws MWException
* @return Job|bool
*/
protected function doAck( Job $job ) {
/**
* @see JobQueue::doDeduplicateRootJob()
+ * @param Job $job
+ * @throws MWException
* @return bool
*/
protected function doDeduplicateRootJob( Job $job ) {
* Insert jobs into the respective queues of with the belong
*
* @param $jobs Job|array A single Job or a list of Jobs
+ * @throws MWException
* @return bool
*/
public function push( $jobs ) {
}
/**
+ * @throws
* @return DatabaseBase
*/
protected function getDB() {
*
* @since 1.21
*
+ * @throws MWException
* @return string|false
*/
public function getProtocol() {
* Determine where to get the list of book sources from,
* format and output them
*
+ * @throws MWException
* @return string
*/
private function showList() {
* be stuffed into old, otherwise the most recent will go into cur.
*
* @param $timestamps Array: pass an empty array to restore all revisions, otherwise list the ones to undelete.
- * @param $comment String
* @param $unsuppress Boolean: remove all ar_deleted/fa_deleted restrictions of seletected revs
*
+ * @param $comment String
+ * @throws ReadOnlyError
* @return Status, containing the number of revisions restored on success
*/
private function undeleteRevisions( $timestamps, $unsuppress = false, $comment = '' ) {