/**
* @todo document
- * @param $article
+ * @param $article Article
*/
function __construct( $article ) {
$this->mArticle =& $article;
$this->mPreloadText = "";
}
+ /**
+ * @return Article
+ */
function getArticle() {
return $this->mArticle;
}
protected $default;
protected $misses = 0;
protected $missLimit = 1000;
-
+
+ /**
+ * @return GenderCache
+ */
public static function singleton() {
static $that = null;
if ( $that === null ) {
/**
* Returns the gender for given username.
- * @param $users String: username
+ * @param $username String: username
* @param $caller String: the calling method
* @return String
*/
/**
* Wrapper for doQuery that processes raw LinkBatch data.
+ *
+ * @param $data
+ * @param $caller
*/
public function doLinkBatch( $data, $caller = '' ) {
$users = array();
}
$this->doQuery( array_keys( $users ), $caller );
-
}
/**
* @ingroup ExternalUser
*/
class ExternalUser_MediaWiki extends ExternalUser {
- private $mRow, $mDb;
+ private $mRow;
+ /**
+ * @var DatabaseBase
+ */
+ private $mDb;
+
+ /**
+ * @param $name string
+ * @return bool
+ */
protected function initFromName( $name ) {
# We might not need the 'usable' bit, but let's be safe. Theoretically
# this might return wrong results for old versions, but it's probably
return $this->initFromCond( array( 'user_name' => $name ) );
}
+ /**
+ * @param $id int
+ * @return bool
+ */
protected function initFromId( $id ) {
return $this->initFromCond( array( 'user_id' => $id ) );
}
+ /**
+ * @param $cond array
+ * @return bool
+ */
private function initFromCond( $cond ) {
global $wgExternalAuthConf;
return $this->mRow->user_id;
}
+ /**
+ * @return string
+ */
public function getName() {
return $this->mRow->user_name;
}
return null;
}
+ /**
+ * @return array
+ */
public function getGroups() {
# @todo FIXME: Untested.
$groups = array();
'CREATE TEMPORARY TABLES',
);
+ /**
+ * @return string
+ */
public function getName() {
return 'mysql';
}
parent::__construct( $parent );
}
+ /**
+ * @return Bool
+ */
public function isCompiled() {
return self::checkExtension( 'mysql' );
}
+ /**
+ * @return array
+ */
public function getGlobalDefaults() {
return array();
}
+ /**
+ * @return string
+ */
public function getConnectForm() {
return
$this->getTextBox( 'wgDBserver', 'config-db-host', array(), $this->parent->getHelpBox( 'config-db-host-help' ) ) .
return $status;
}
+ /**
+ * @return Status
+ */
public function openConnection() {
$status = Status::newGood();
try {
/**
* Get a list of storage engines that are available and supported
+ *
+ * @return array
*/
public function getEngines() {
$engines = array( 'InnoDB', 'MyISAM' );
/**
* Get a list of character sets that are available and supported
+ *
+ * @return array
*/
public function getCharsets() {
$status = $this->getConnection();
/**
* Return true if the install user can create accounts
+ *
+ * @return bool
*/
public function canCreateAccounts() {
$status = $this->getConnection();
return true;
}
+ /**
+ * @return string
+ */
public function getSettingsForm() {
if ( $this->canCreateAccounts() ) {
$noCreateMsg = false;
return $s;
}
+ /**
+ * @return Status
+ */
public function submitSettingsForm() {
$this->setVarsFromRequest( array( '_MysqlEngine', '_MysqlCharset' ) );
$status = $this->submitWebUserBox();
$this->parent->addInstallStep( $callback, 'tables' );
}
+ /**
+ * @return Status
+ */
public function setupDatabase() {
$status = $this->getConnection();
if ( !$status->isOK() ) {
return $status;
}
+ /**
+ * @return Status
+ */
public function setupUser() {
$dbUser = $this->getVar( 'wgDBuser' );
if( $dbUser == $this->getVar( '_InstallUser' ) ) {
/**
* Get variables to substitute into tables.sql and the SQL patch files.
+ *
+ * @return array
*/
public function getSchemaVars() {
return array(
* @ingroup Media
*/
class DjVuHandler extends ImageHandler {
+
+ /**
+ * @return bool
+ */
function isEnabled() {
global $wgDjvuRenderer, $wgDjvuDump, $wgDjvuToXML;
if ( !$wgDjvuRenderer || ( !$wgDjvuDump && !$wgDjvuToXML ) ) {
}
}
- function mustRender( $file ) { return true; }
- function isMultiPage( $file ) { return true; }
+ /**
+ * @param $file
+ * @return bool
+ */
+ function mustRender( $file ) {
+ return true;
+ }
+
+ /**
+ * @param $file
+ * @return bool
+ */
+ function isMultiPage( $file ) {
+ return true;
+ }
+ /**
+ * @return array
+ */
function getParamMap() {
return array(
'img_width' => 'width',
);
}
+ /**
+ * @param $name
+ * @param $value
+ * @return bool
+ */
function validateParam( $name, $value ) {
if ( in_array( $name, array( 'width', 'height', 'page' ) ) ) {
if ( $value <= 0 ) {
}
}
+ /**
+ * @param $params
+ * @return bool|string
+ */
function makeParamString( $params ) {
$page = isset( $params['page'] ) ? $params['page'] : 1;
if ( !isset( $params['width'] ) ) {
return "page{$page}-{$params['width']}px";
}
+ /**
+ * @param $str
+ * @return array|bool
+ */
function parseParamString( $str ) {
$m = false;
if ( preg_match( '/^page(\d+)-(\d+)px$/', $str, $m ) ) {
}
}
+ /**
+ * @param $params
+ * @return array
+ */
function getScriptParams( $params ) {
return array(
'width' => $params['width'],
/**
* Cache an instance of DjVuImage in an Image object, return that instance
+ *
+ * @return DjVuImage
*/
function getDjVuImage( $image, $path ) {
if ( !$image ) {
return serialize($metadata);
}
-
+
+ /**
+ * @param $image File
+ * @return array|bool
+ */
function formatMetadata( $image ) {
$meta = $image->getMetadata();
}
}
+ /**
+ * @return PPFrame_DOM
+ */
function newFrame() {
return new PPFrame_DOM( $this );
}
+ /**
+ * @param $args
+ * @return PPCustomFrame_DOM
+ */
function newCustomFrame( $args ) {
return new PPCustomFrame_DOM( $this, $args );
}
);
}
+ /**
+ * @return array
+ */
function getOrderFields() {
return array ( 'rd_namespace', 'rd_title', 'rd_from' );
}
+ /**
+ * @param $skin Skin
+ * @param $result
+ * @return String
+ */
function formatResult( $skin, $result ) {
global $wgUser, $wgContLang, $wgLang;
array(),
array( 'action' => 'edit' )
);
- $to = $skin->link(
+ $to = $skin->link(
$toObj,
null,
array(),
}
/**
- * Fetch links and cache their existence
+ * Fetch links and cache their existence
+ *
+ * @param $db DatabaseBase
*/
function preprocessResults( $db, $res ) {
$batch = new LinkBatch;