/**
* General accessor to get/set whether SELECT FOR UPDATE should be used
*
- * @param $update
+ * @param bool $update
* @return bool
*/
public function forUpdate( $update = null ) {
}
/**
- * @param $title
- * @return array|int
+ * @param string $title
+ * @return int
*/
public function getGoodLinkID( $title ) {
if ( array_key_exists( $title, $this->mGoodLinks ) ) {
/**
* Get a field of a title object from cache.
* If this link is not good, it will return NULL.
- * @param $title Title
+ * @param Title $title
* @param string $field ('length','redirect','revision','model')
- * @return mixed
+ * @return string|null
*/
public function getGoodLinkFieldObj( $title, $field ) {
$dbkey = $title->getPrefixedDBkey();
}
/**
- * @param $title
+ * @param string $title
* @return bool
*/
public function isBadLink( $title ) {
* @param int $len Text's length
* @param int $redir Whether the page is a redirect
* @param int $revision Latest revision's ID
- * @param int $model Latest revision's content model ID
+ * @param string|null $model Latest revision's content model ID
*/
public function addGoodLinkObj( $id, $title, $len = -1, $redir = null,
- $revision = 0, $model = 0
+ $revision = 0, $model = null
) {
$dbkey = $title->getPrefixedDBkey();
$this->mGoodLinks[$dbkey] = (int)$id;
'length' => (int)$len,
'redirect' => (int)$redir,
'revision' => (int)$revision,
- 'model' => (int)$model
+ 'model' => $model ? (string)$model : null,
);
}
/**
* Same as above with better interface.
* @since 1.19
- * @param $title Title
- * @param $row object which has the fields page_id, page_is_redirect,
+ * @param Title $title
+ * @param stdClass $row Object which has the fields page_id, page_is_redirect,
* page_latest and page_content_model
*/
public function addGoodLinkObjFromRow( $title, $row ) {
}
/**
- * @param $title Title
+ * @param Title $title
*/
public function addBadLinkObj( $title ) {
$dbkey = $title->getPrefixedDBkey();
}
/**
- * @param $title Title
+ * @param Title $title
*/
public function clearLink( $title ) {
$dbkey = $title->getPrefixedDBkey();
/**
* Add a title to the link cache, return the page_id or zero if non-existent
*
- * @param string $title title to add
- * @return Integer
+ * @param string $title Title to add
+ * @return int
*/
public function addLink( $title ) {
$nt = Title::newFromDBkey( $title );
/**
* Add a title to the link cache, return the page_id or zero if non-existent
*
- * @param $nt Title object to add
- * @return Integer
+ * @param Title $nt Title object to add
+ * @return int
*/
public function addLinkObj( $nt ) {
global $wgAntiLockFlags, $wgContentHandlerUseDB;