/**
* Set the offset from an other source than the request
*
- * @param $offset Int|String
+ * @param int|string $offset
*/
function setOffset( $offset ) {
$this->mOffset = $offset;
}
+
/**
* Set the limit from an other source than the request
*
* Verifies limit is between 1 and 5000
*
- * @param $limit Int|String
+ * @param int|string $limit
*/
function setLimit( $limit ) {
$limit = (int)$limit;
* in the result or not. By default this is not the case, but when the
* offset is user-supplied this might be wanted.
*
- * @param $include bool
+ * @param bool $include
*/
public function setIncludeOffset( $include ) {
$this->mIncludeOffset = $include;
* Extract some useful data from the result object for use by
* the navigation bar, put it into $this
*
- * @param $isFirst bool: False if there are rows before those fetched (i.e.
+ * @param bool $isFirst False if there are rows before those fetched (i.e.
* if a "previous" link would make sense)
- * @param $limit Integer: exact query limit
- * @param $res ResultWrapper
+ * @param int $limit Exact query limit
+ * @param ResultWrapper $res
*/
function extractResultInfo( $isFirst, $limit, ResultWrapper $res ) {
$numRows = $res->numRows();
/**
* Get some text to go in brackets in the "function name" part of the SQL comment
*
- * @return String
+ * @return string
*/
function getSqlComment() {
return get_class( $this );
* Do a query with specified parameters, rather than using the object
* context
*
- * @param string $offset index offset, inclusive
- * @param $limit Integer: exact query limit
- * @param $descending Boolean: query direction, false for ascending, true for descending
+ * @param string $offset Index offset, inclusive
+ * @param int $limit Exact query limit
+ * @param bool $descending Query direction, false for ascending, true for descending
* @return ResultWrapper
*/
public function reallyDoQuery( $offset, $limit, $descending ) {
/**
* Build variables to use by the database wrapper.
*
- * @param string $offset index offset, inclusive
- * @param $limit Integer: exact query limit
- * @param $descending Boolean: query direction, false for ascending, true for descending
+ * @param string $offset Index offset, inclusive
+ * @param int $limit Exact query limit
+ * @param bool $descending Query direction, false for ascending, true for descending
* @return array
*/
protected function buildQueryInfo( $offset, $limit, $descending ) {
/**
* Pre-process results; useful for performing batch existence checks, etc.
*
- * @param $result ResultWrapper
+ * @param ResultWrapper $result
*/
protected function preprocessResults( $result ) {}
* Get the formatted result list. Calls getStartBody(), formatRow() and
* getEndBody(), concatenates the results and returns them.
*
- * @return String
+ * @return string
*/
public function getBody() {
if ( !$this->mQueryDone ) {
/**
* Make a self-link
*
- * @param string $text text displayed on the link
- * @param array $query associative array of parameter to be in the query string
- * @param string $type value of the "rel" attribute
+ * @param string $text Text displayed on the link
+ * @param array $query Associative array of parameter to be in the query string
+ * @param string $type Value of the "rel" attribute
*
- * @return String: HTML fragment
+ * @return string HTML fragment
*/
function makeLink( $text, array $query = null, $type = null ) {
if ( $query === null ) {
* Hook into getBody(), allows text to be inserted at the start. This
* will be called even if there are no rows in the result set.
*
- * @return String
+ * @return string
*/
protected function getStartBody() {
return '';
/**
* Hook into getBody() for the end of the list
*
- * @return String
+ * @return string
*/
protected function getEndBody() {
return '';
* Hook into getBody(), for the bit between the start and the
* end when there are no rows
*
- * @return String
+ * @return string
*/
protected function getEmptyBody() {
return '';
/**
* Get the number of rows in the result set
*
- * @return Integer
+ * @return int
*/
function getNumRows() {
if ( !$this->mQueryDone ) {
/**
* Get a URL query array for the prev, next, first and last links.
*
- * @return Array
+ * @return array
*/
function getPagingQueries() {
if ( !$this->mQueryDone ) {
/**
* Returns whether to show the "navigation bar"
*
- * @return Boolean
+ * @return bool
*/
function isNavigationBarShown() {
if ( !$this->mQueryDone ) {
* $linkTexts will be used. Both $linkTexts and $disabledTexts are arrays
* of HTML.
*
- * @param $linkTexts Array
- * @param $disabledTexts Array
- * @return Array
+ * @param array $linkTexts
+ * @param array $disabledTexts
+ * @return array
*/
function getPagingLinks( $linkTexts, $disabledTexts = array() ) {
$queries = $this->getPagingQueries();
* options => option array
* join_conds => JOIN conditions
*
- * @return Array
+ * @return array
*/
abstract function getQueryInfo();
* Needless to say, it's really not a good idea to use a non-unique index
* for this! That won't page right.
*
- * @return string|Array
+ * @return string|array
*/
abstract function getIndexField();
* page_len,page_id avoids temp tables (given a page_len index). This would
* also work if page_id was non-unique but we had a page_len,page_id index.
*
- * @return Array
+ * @return array
*/
protected function getExtraSortFields() {
return array();
* particular instantiation, which is a single value. This is the set of
* all defaults for the class.
*
- * @return Boolean
+ * @return bool
*/
protected function getDefaultDirections() {
return false;
* Shamelessly stolen bits from ReverseChronologicalPager,
* didn't want to do class magic as may be still revamped
*
- * @return String HTML
+ * @return string HTML
*/
function getNavigationBar() {
if ( !$this->isNavigationBarShown() ) {
* array whose keys must exactly match the keys of the array returned
* by getIndexField(), and whose values are message keys.
*
- * @return Array
+ * @return array
*/
protected function getOrderTypeMessages() {
return null;
/**
* @protected
* @param stdClass $row
- * @return String HTML
+ * @return string HTML
*/
function formatRow( $row ) {
$this->mCurrentRow = $row; // In case formatValue etc need to know
*
* @protected
*
- * @param $row Object: the database result row
- * @return String
+ * @param object $row The database result row
+ * @return string
*/
function getRowClass( $row ) {
return '';
*
* @protected
*
- * @param $row Object: the database result row
- * @return Array of attribute => value
+ * @param object $row The database result row
+ * @return array Array of attribute => value
*/
function getRowAttrs( $row ) {
$class = $this->getRowClass( $row );
*
* @param string $field The column
* @param string $value The cell contents
- * @return Array of attr => value
+ * @return array Array of attr => value
*/
function getCellAttrs( $field, $value ) {
return array( 'class' => 'TablePager_col_' . $field );
/**
* A navigation bar with images
- * @return String HTML
+ * @return string HTML
*/
public function getNavigationBar() {
global $wgStylePath;
/**
* Get a "<select>" element which has options for each of the allowed limits
*
- * @param $attribs String: Extra attributes to set
- * @return String: HTML fragment
+ * @param string $attribs Extra attributes to set
+ * @return string HTML fragment
*/
public function getLimitSelect( $attribs = array() ) {
$select = new XmlSelect( 'limit', false, $this->mLimit );
* Resubmits all defined elements of the query string, except for a
* blacklist, passed in the $blacklist parameter.
*
- * @param array $blacklist parameters from the request query which should not be resubmitted
- * @return String: HTML fragment
+ * @param array $blacklist Parameters from the request query which should not be resubmitted
+ * @return string HTML fragment
*/
function getHiddenFields( $blacklist = array() ) {
$blacklist = (array)$blacklist;
/**
* Get a form containing a limit selection dropdown
*
- * @return String: HTML fragment
+ * @return string HTML fragment
*/
function getLimitForm() {
global $wgScript;
* Return true if the named field should be sortable by the UI, false
* otherwise
*
- * @param $field String
+ * @param string $field
*/
abstract function isFieldSortable( $field );
*
* @protected
*
- * @param string $name the database field name
- * @param string $value the value retrieved from the database
+ * @param string $name The database field name
+ * @param string $value The value retrieved from the database
*/
abstract function formatValue( $name, $value );
* field name, for use in the table header. The description should be plain
* text, it will be HTML-escaped later.
*
- * @return Array
+ * @return array
*/
abstract function getFieldNames();
}