/**
* Constructor
*
- * @param string $tablename name of the table to use
+ * @param $tablename String: name of the table to use
*/
function __construct($tablename = 'objectcache') {
$this->table = $tablename;
* On typical message and page data, this can provide a 3X decrease
* in storage requirements.
*
- * @param mixed $data
+ * @param $data mixed
* @return string
*/
function _serialize( &$data ) {
/**
* Unserialize and, if necessary, decompress an object.
- * @param string $serial
+ * @param $serial string
* @return mixed
*/
function _unserialize( $serial ) {
/**
* Get a value from the XCache object cache
*
- * @param string $key Cache key
+ * @param $key String: cache key
* @return mixed
*/
public function get( $key ) {
/**
* Store a value in the XCache object cache
*
- * @param string $key Cache key
- * @param mixed $value Object to store
- * @param int $expire Expiration time
+ * @param $key String: cache key
+ * @param $value Mixed: object to store
+ * @param $expire Int: expiration time
* @return bool
*/
public function set( $key, $value, $expire = 0 ) {
/**
* Remove a value from the XCache object cache
*
- * @param string $key Cache key
- * @param int $time Not used in this implementation
+ * @param $key String: cache key
+ * @param $time Int: not used in this implementation
* @return bool
*/
public function delete( $key, $time = 0 ) {
* make additional queries to pull source data while the
* main query is still running.
*
- * @param Database $db
- * @param mixed $history one of WikiExporter::FULL or WikiExporter::CURRENT, or an
- * associative array:
- * offset: non-inclusive offset at which to start the query
- * limit: maximum number of rows to return
- * dir: "asc" or "desc" timestamp order
- * @param int $buffer one of WikiExporter::BUFFER or WikiExporter::STREAM
+ * @param $db Database
+ * @param $history Mixed: one of WikiExporter::FULL or WikiExporter::CURRENT,
+ * or an associative array:
+ * offset: non-inclusive offset at which to start the query
+ * limit: maximum number of rows to return
+ * dir: "asc" or "desc" timestamp order
+ * @param $buffer Int: one of WikiExporter::BUFFER or WikiExporter::STREAM
*/
function __construct( &$db, $history = WikiExporter::CURRENT,
$buffer = WikiExporter::BUFFER, $text = WikiExporter::TEXT ) {
* various row objects and XML output for filtering. Filters
* can be chained or used as callbacks.
*
- * @param mixed $callback
+ * @param $sink mixed
*/
function setOutputSink( &$sink ) {
$this->sink =& $sink;
/**
* Dumps a series of page and revision records for those pages
* in the database falling within the page_id range given.
- * @param int $start Inclusive lower limit (this id is included)
- * @param int $end Exclusive upper limit (this id is not included)
+ * @param $start Int: inclusive lower limit (this id is included)
+ * @param $end Int: Exclusive upper limit (this id is not included)
* If 0, no upper limit.
*/
function pagesByRange( $start, $end ) {
}
/**
- * @param Title $title
+ * @param $title Title
*/
function pageByTitle( $title ) {
return $this->dumpFrom(
* separate database connection not managed by LoadBalancer; some
* blob storage types will make queries to pull source data.
*
- * @param ResultWrapper $resultset
+ * @param $resultset ResultWrapper
* @access private
*/
function outputStream( $resultset ) {
* Opens a <page> section on the output stream, with data
* from the given database row.
*
- * @param object $row
+ * @param $row object
* @return string
* @access private
*/
* Dumps a <revision> section on the output stream, with
* data filled in from the given database row.
*
- * @param object $row
+ * @param $row object
* @return string
* @access private
*/
/**
* Sets the action to perform as each new page in the stream is reached.
- * @param callable $callback
- * @return callable
+ * @param $callback callback
+ * @return callback
*/
function setPageCallback( $callback ) {
$previous = $this->mPageCallback;
* with the original title form (in case it's been overridden into a
* local namespace), and a count of revisions.
*
- * @param callable $callback
- * @return callable
+ * @param $callback callback
+ * @return callback
*/
function setPageOutCallback( $callback ) {
$previous = $this->mPageOutCallback;
/**
* Sets the action to perform as each page revision is reached.
- * @param callable $callback
- * @return callable
+ * @param $callback callback
+ * @return callback
*/
function setRevisionCallback( $callback ) {
$previous = $this->mRevisionCallback;
/**
* Sets the action to perform as each file upload version is reached.
- * @param callable callback
- * @return callable
+ * @param $callback callback
+ * @return callback
*/
function setUploadCallback( $callback ) {
$previous = $this->mUploadCallback;
/**
* Default per-revision callback, performs the import.
- * @param WikiRevision $revision
+ * @param $revision WikiRevision
* @private
*/
function importRevision( $revision ) {
/**
* Alternate per-revision callback, for debugging.
- * @param WikiRevision $revision
+ * @param $revision WikiRevision
* @private
*/
function debugRevisionHandler( &$revision ) {
/**
* Notify the callback function when a new <page> is reached.
- * @param Title $title
+ * @param $title Title
* @private
*/
function pageCallback( $title ) {
/**
* Notify the callback function when a </page> is closed.
- * @param Title $title
- * @param Title $origTitle
- * @param int $revisionCount
- * @param int $successCount number of revisions for which callback returned true
+ * @param $title Title
+ * @param $origTitle Title
+ * @param $revisionCount int
+ * @param $successCount Int: number of revisions for which callback returned true
* @private
*/
function pageOutCallback( $title, $origTitle, $revisionCount, $successCount ) {
* Check if the given title already is watched by the user, and if so
* add watches on a new title. To be used for page renames and such.
*
- * @param Title $ot Page title to duplicate entries from, if present
- * @param Title $nt Page title to add watches on
+ * @param $ot Title: page title to duplicate entries from, if present
+ * @param $nt Title: page title to add watches on
*/
static function duplicateEntries( $ot, $nt ) {
WatchedItem::doDuplicateEntries( $ot->getSubjectPage(), $nt->getSubjectPage() );
/**
* Main execution point
*
- * @param User $user
- * @param OutputPage $output
- * @param WebRequest $request
- * @param int $mode
+ * @param $user User
+ * @param $output OutputPage
+ * @param $request WebRequest
+ * @param $mode int
*/
public function execute( $user, $output, $request, $mode ) {
global $wgUser;
/**
* Check the edit token from a form submission
*
- * @param WebRequest $request
- * @param User $user
+ * @param $request WebRequest
+ * @param $user User
* @return bool
*/
private function checkToken( $request, $user ) {
* Extract a list of titles from a blob of text, returning
* (prefixed) strings; unwatchable titles are ignored
*
- * @param mixed $list
+ * @param $list mixed
* @return array
*/
private function extractTitles( $list ) {
* $titles can be an array of strings or Title objects; the former
* is preferred, since Titles are very memory-heavy
*
- * @param array $titles An array of strings, or Title objects
- * @param OutputPage $output
- * @param Skin $skin
+ * @param $titles An array of strings, or Title objects
+ * @param $output OutputPage
+ * @param $skin Skin
*/
private function showTitles( $titles, $output, $skin ) {
$talk = wfMsgHtml( 'talkpagelinktext' );
/**
* Count the number of titles on a user's watchlist, excluding talk pages
*
- * @param User $user
+ * @param $user User
* @return int
*/
private function countWatchlist( $user ) {
* Prepare a list of titles on a user's watchlist (excluding talk pages)
* and return an array of (prefixed) strings
*
- * @param User $user
+ * @param $user User
* @return array
*/
private function getWatchlist( $user ) {
* and return as a two-dimensional array with namespace, title and
* redirect status
*
- * @param User $user
+ * @param $user User
* @return array
*/
private function getWatchlistInfo( $user ) {
* Show a message indicating the number of items on the user's watchlist,
* and return this count for additional checking
*
- * @param OutputPage $output
- * @param User $user
+ * @param $output OutputPage
+ * @param $user User
* @return int
*/
private function showItemCount( $output, $user ) {
/**
* Remove all titles from a user's watchlist
*
- * @param User $user
+ * @param $user User
*/
private function clearWatchlist( $user ) {
$dbw = wfGetDB( DB_MASTER );
* $titles can be an array of strings or Title objects; the former
* is preferred, since Titles are very memory-heavy
*
- * @param array $titles An array of strings, or Title objects
- * @param User $user
+ * @param $titles An array of strings, or Title objects
+ * @param $user User
*/
private function watchTitles( $titles, $user ) {
$dbw = wfGetDB( DB_MASTER );
* $titles can be an array of strings or Title objects; the former
* is preferred, since Titles are very memory-heavy
*
- * @param array $titles An array of strings, or Title objects
- * @param User $user
+ * @param $titles An array of strings, or Title objects
+ * @param $user User
*/
private function unwatchTitles( $titles, $user ) {
$dbw = wfGetDB( DB_MASTER );
/**
* Show the standard watchlist editing form
*
- * @param OutputPage $output
- * @param User $user
+ * @param $output OutputPage
+ * @param $user User
*/
private function showNormalForm( $output, $user ) {
global $wgUser;
/**
* Get the correct "heading" for a namespace
*
- * @param int $namespace
+ * @param $namespace int
* @return string
*/
private function getNamespaceHeading( $namespace ) {
* Build a single list item containing a check box selecting a title
* and a link to that title, with various additional bits
*
- * @param Title $title
- * @param bool $redirect
- * @param Skin $skin
+ * @param $title Title
+ * @param $redirect bool
+ * @param $skin Skin
* @return string
*/
private function buildRemoveLine( $title, $redirect, $skin ) {
/**
* Show a form for editing the watchlist in "raw" mode
*
- * @param OutputPage $output
- * @param User $user
+ * @param $output OutputPage
+ * @param $user User
*/
public function showRawForm( $output, $user ) {
global $wgUser;
* Determine whether we are editing the watchlist, and if so, what
* kind of editing operation
*
- * @param WebRequest $request
- * @param mixed $par
+ * @param $request WebRequest
+ * @param $par mixed
* @return int
*/
public static function getMode( $request, $par ) {
* Build a set of links for convenient navigation
* between watchlist viewing and editing modes
*
- * @param Skin $skin Skin to use
+ * @param $skin Skin to use
* @return string
*/
public static function buildTools( $skin ) {
*/
class WikiError {
/**
- * @param string $message
+ * @param $message string
*/
function __construct( $message ) {
$this->mMessage = $message;
* Returns true if the given object is a WikiError-descended
* error object, false otherwise.
*
- * @param mixed $object
+ * @param $object mixed
* @return bool
- * @static
*/
public static function isError( $object ) {
return $object instanceof WikiError;
*/
class WikiErrorMsg extends WikiError {
/**
- * @param string $message Wiki message name
+ * @param $message String: wiki message name
* @param ... parameters to pass to wfMsg()
*/
function WikiErrorMsg( $message/*, ... */ ) {
*/
class WikiXmlError extends WikiError {
/**
- * @param resource $parser
- * @param string $message
+ * @param $parser resource
+ * @param $message string
+ * @param $context
+ * @param $offset Int
*/
function WikiXmlError( $parser, $message = 'XML parsing error', $context = null, $offset = 0 ) {
$this->mXmlError = xml_get_error_code( $parser );