* from another page on the wiki.
* @param $from Title object.
*/
- public function setRedirectedFrom( $from ) {
+ public function setRedirectedFrom( Title $from ) {
$this->mRedirectedFrom = $from;
}
/**
* Get the Title object this text redirects to
*
+ * @param $text string article content containing redirect info
* @return mixed false, Title of in-wiki target, or string with URL
*/
public function followRedirectText( $text ) {
/**
* get the title object of the article
+ * @return Title object of current title
*/
public function getTitle() {
return $this->mTitle;
* Fetch a page record with the given conditions
* @param $dbr Database object
* @param $conditions Array
+ * @return mixed Database result resource, or false on failure
*/
protected function pageData( $dbr, $conditions ) {
$fields = array(
}
/**
+ * Fetch a page record matching the Title object's namespace and title
+ * using a sanitized title string
+ *
* @param $dbr Database object
* @param $title Title object
+ * @return mixed Database result resource, or false on failure
*/
public function pageDataFromTitle( $dbr, $title ) {
return $this->pageData( $dbr, array(
}
/**
+ * Fetch a page record matching the requested ID
+ *
* @param $dbr Database
* @param $id Integer
*/
/**
* Get text of an article from database
* Does *NOT* follow redirects.
+ *
* @param $oldid Int: 0 for whatever the latest revision is
- * @return string
+ * @return mixed string containing article contents, or false if null
*/
function fetchContent( $oldid = 0 ) {
if ( $this->mContentLoaded ) {
* Read/write accessor to select FOR UPDATE
*
* @param $x Mixed: FIXME
+ * @return
*/
public function forUpdate( $x = null ) {
return wfSetVar( $this->mForUpdate, $x );