A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://www.mediawiki.org/wiki/Manual:Title.php below:

Manual:Title.php - MediaWiki

Before 1.40:

The Title class represents page titles.

Methods for accessing an instance of Title include:

Instantiation methods[edit]

To instantiate Title, call one of the static factory methods:

To check and see if a given page already exists:

$titleObject = Title::newFromText( 'Talk:Your desired title here' );
if ( !$titleObject->exists() ) echo "There is no page with that name.";

Create a new Title from text, such as what one would find in a link. Decodes any HTML entities in the text. Spaces, prefixes, and an initial ':' indicating the main namespace are accepted. Note that if the page does not exist, this will not create it. For that, see Manual:Article.php .

Relating to page titles[edit] Relating to page titles (URL-encoded)[edit]

URL-encoded titles, not actual URLs:

Relating to page URLs[edit] Checking page titles[edit] Relating to page title fragments[edit]

For other options, see NamespaceInfo instead.

Relating to incoming and outgoing links[edit]

Handle with care:

Relating to page language[edit]

Relating to page_touched/timestamps :

Relating to viewability[edit] Link cache, page IDs, etc.[edit] Using the Title object[edit]

In order to create objects or access data, many methods in other MediaWiki PHP classes depend on the availability of a Title object.

For example, if you have a Title object, you can get a:

This class can fetch various kinds of data from the database; however, it does so inefficiently. Consider using a TitleValue object instead. TitleValue is more lightweight and does not rely on global state or the database.

  1. Mutable is a key word of the norm saying that even a const object can modify this variable. A mutable attribute can be private or public. It can always be modified even when the object is in a constant context.
  2. Mutator is the general name of a member function which can modify one or more object private variables from outside. It is useless to set it private.

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4