|
ILIAS
release_8 Revision v8.24
|
Collaboration diagram for Title:Public Member Functions | |
| __construct () | |
| #- More... | |
| isLocal () | |
| Determine whether the object refers to a page within this project. More... | |
| isTrans () | |
| Determine whether the object refers to a page within this project and is transcludable. More... | |
| getText () | |
| Simple accessors. More... | |
| getPartialURL () | |
| Get the URL-encoded form of the main part. More... | |
| getDBkey () | |
| Get the main part with underscores. More... | |
| getNamespace () | |
| Get the namespace index, i.e. More... | |
| getNsText () | |
| Get the namespace text. More... | |
| getInterwiki () | |
| Get the namespace text of the subject (rather than talk) page. More... | |
| getFragment () | |
| Get the Title fragment (i.e. More... | |
| getFragmentForURL () | |
| Get the fragment in URL form, including the "#" character if there is one. More... | |
| getDefaultNamespace () | |
| Get the default namespace index, for when there is no namespace. More... | |
| getIndexTitle () | |
| Get title for search index. More... | |
| getPrefixedDBkey () | |
| Get the prefixed database key form. More... | |
| getPrefixedText () | |
| Get the prefixed title with spaces. More... | |
| getFullText () | |
| Get the prefixed title with spaces, plus any fragment (part beginning with '#') More... | |
| getBaseText () | |
| Get the base name, i.e. More... | |
| getSubpageText () | |
| Get the lowest-level subpage name, i.e. More... | |
| getSubpageUrlForm () | |
| Get a URL-encoded form of the subpage text. More... | |
| getPrefixedURL () | |
| Get a URL-encoded title (not an actual URL) including interwiki. More... | |
| getFullURL ($query='', $variant=false) | |
| Get a real URL referring to this title, with interwiki link and fragment. More... | |
| getLocalURL ($query='', $variant=false) | |
| Get a URL with no fragment or server name. More... | |
| escapeLocalURL ($query='') | |
| Get an HTML-escaped version of the URL form, suitable for using in a link, without a server name or fragment. More... | |
| escapeFullURL ($query='') | |
| Get an HTML-escaped version of the URL form, suitable for using in a link, including the server name and fragment. More... | |
| getInternalURL ($query='', $variant=false) | |
| Get the URL form for an internal link. More... | |
| getEditURL () | |
| Get the edit URL for this Title. More... | |
| getEscapedText () | |
| Get the HTML-escaped displayable text form. More... | |
| isExternal () | |
| Is this Title interwiki? More... | |
| isSemiProtected ($action='edit') | |
| Is this page "semi-protected" - the only protection is autoconfirm? More... | |
| isProtected ($action='') | |
| Does the title correspond to a protected article? More... | |
| userIsWatching () | |
| Is $wgUser is watching this page? More... | |
| quickUserCan ($action) | |
| Can $wgUser perform $action on this page? This skips potentially expensive cascading permission checks. More... | |
| userCan ($action, $doExpensiveQueries=true) | |
| Can $wgUser perform $action on this page? More... | |
| userCanEdit ($doExpensiveQueries=true) | |
| Can $wgUser edit this page? More... | |
| userCanCreate ($doExpensiveQueries=true) | |
| Can $wgUser create this page? More... | |
| userCanMove ($doExpensiveQueries=true) | |
| Can $wgUser move this page? More... | |
| userCanRead () | |
| Would anybody with sufficient privileges be able to move this page? Some pages just aren't movable. More... | |
| isSubpage () | |
| Is this a talk page of some sort? More... | |
| getSkinFromCssJsSubpage () | |
| Trim down a .css or .js subpage title to get the corresponding skin name. More... | |
| isCssSubpage () | |
| Is this a .css subpage of a user page? More... | |
| isJsSubpage () | |
| Is this a .js subpage of a user page? More... | |
| userCanEditCssJsSubpage () | |
| Protect css/js subpages of user pages: can $wgUser edit this page? More... | |
| areRestrictionsCascading () | |
| loadRestrictions ($oldFashionedRestrictions=null) | |
| getRestrictions ($action) | |
| Accessor/initialisation for mRestrictions. More... | |
| isDeleted () | |
| Is there a version of this page in the deletion archive? More... | |
| getArticleID ($flags=0) | |
| Get the article ID for this Title from the link cache, adding it if necessary. More... | |
| getLatestRevID () | |
| resetArticleID ($newid) | |
| This clears some fields in this object, and clears any associated keys in the "bad links" section of the link cache. More... | |
| invalidateCache () | |
| Updates page_touched for this page; called from LinksUpdate.php. More... | |
| prefix ($name) | |
| Prefix some arbitrary text with the namespace or interwiki prefix of this object. More... | |
| setFragment ($fragment) | |
| Set the fragment for this title This is kind of bad, since except for this rarely-used function, Title objects are immutable. More... | |
| getLinksTo ($options='', $table='pagelinks', $prefix='pl') | |
| Get a Title object associated with the talk page of this article. More... | |
| getTemplateLinksTo ($options='') | |
| Get an array of Title objects using this Title as a template Also stores the IDs in the link cache. More... | |
| getBrokenLinksFrom ($options='') | |
| Get an array of Title objects referring to non-existent articles linked from this page. More... | |
| getSquidURLs () | |
| Get a list of URLs to purge from the Squid cache when this page changes. More... | |
| purgeSquid () | |
| moveNoAuth (&$nt) | |
| Move this page without authentication. More... | |
| isValidMoveOperation ($nt, $auth=true) | |
| Check whether a given move operation would be valid. More... | |
| moveTo (&$nt, $auth=true, $reason='') | |
| Move a title to a new location. More... | |
| isValidMoveTarget ($nt) | |
| Checks if $this can be moved to a given Title. More... | |
| getParentCategories () | |
| Get categories to which this Title belongs and return an array of categories' names. More... | |
| getParentCategoryTree ($children=array()) | |
| Get a tree of parent categories. More... | |
| pageCond () | |
| Get an associative array for selecting this title from the "page" table. More... | |
| getPreviousRevisionID ($revision) | |
| Get the revision ID of the previous revision. More... | |
| getNextRevisionID ($revision) | |
| Get the revision ID of the next revision. More... | |
| countRevisionsBetween ($old, $new) | |
| Get the number of revisions between the given revision IDs. More... | |
| equals ($title) | |
| Compare with another title. More... | |
| exists () | |
| Check if page exists. More... | |
| isAlwaysKnown () | |
| Should a link should be displayed as a known link, just based on its title? More... | |
| touchLinks () | |
| Update page_touched timestamps and send squid purge messages for pages linking to this title. More... | |
| getTouched () | |
| Get the last touched timestamp. More... | |
| trackbackURL () | |
| trackbackRDF () | |
| getNamespaceKey () | |
| Generate strings used for xml 'id' names in monobook tabs. More... | |
| isSpecial ($name) | |
| Returns true if this title resolves to the named special page. More... | |
| fixSpecialName () | |
| If the Title refers to a special page alias which is not the local default, returns a new Title which points to the local default. More... | |
Static Public Member Functions | |
| static | newFromDBkey ($key) |
| Create a new Title from a prefixed DB key. More... | |
| static | newFromText ($text, $defaultNamespace=NS_MAIN) |
| Create a new Title from text, such as what one would find in a link. More... | |
| static | newFromURL ($url) |
| Create a new Title from URL-encoded text. More... | |
| static | newFromID ($id) |
| Create a new Title from an article ID. More... | |
| static | newFromIDs ($ids) |
| Make an array of titles from an array of IDs. More... | |
| static & | makeTitle ($ns, $title) |
| Create a new Title from a namespace index and a DB key. More... | |
| static | makeTitleSafe ($ns, $title) |
| Create a new Title from a namespace index and a DB key. More... | |
| static | newMainPage () |
| Create a new Title for the Main Page. More... | |
| nameOf ($id) | |
| Get the prefixed DB key associated with an ID. More... | |
| static | legalChars () |
| Get a regex character class describing the legal characters in a link. More... | |
| static | makeName ($ns, $title) |
| getInterwikiLink ($key) | |
| Returns the URL associated with an interwiki prefix. More... | |
| static | getInterwikiCached ($key) |
| Fetch interwiki prefix data from local cache in constant database. More... | |
| static | escapeFragmentForURL ($fragment) |
| Escape a text fragment, say from a link, for a URL. More... | |
| static | purgeExpiredRestrictions () |
| Purge expired restrictions from the page_restrictions table. More... | |
Data Fields | |
| $mTextform | |
| All member variables should be considered private Please use the accessor functions. More... | |
| $mUrlform | |
| $mDbkeyform | |
| $mNamespace | |
| $mInterwiki | |
| $mFragment | |
| $mArticleID | |
| $mLatestID | |
| $mRestrictions | |
| $mCascadeRestriction | |
| $mRestrictionsExpiry | |
| $mHasCascadingRestrictions | |
| $mCascadeRestrictionSources | |
| $mRestrictionsLoaded | |
| $mPrefixedText | |
| $mDefaultNamespace | |
| $mWatched | |
Private Member Functions | |
| loadRestrictionsFromRow ($res, $oldFashionedRestrictions=null) | |
| Loads a string into mRestrictions array. More... | |
| secureAndSplit () | |
| Secure and split - main initialisation function for this object. More... | |
| moveOverExistingRedirect ($nt, $reason='') | |
| Move page to a title which is at present a redirect to the source page. More... | |
| moveToNewTitle (&$nt, $reason='') | |
| Move page to non-existing title. More... | |
Static Private Attributes | |
| static | $titleCache = array() |
| Static cache variables. More... | |
| static | $interwikiCache = array() |
Title class.
| Title::__construct | ( | ) |
#-
Constructor
Definition at line 69 of file Title.php.
References NS_MAIN.
| Title::areRestrictionsCascading | ( | ) |
Definition at line 1272 of file Title.php.
References $mCascadeRestriction, and loadRestrictions().
Here is the call graph for this function:| Title::countRevisionsBetween | ( | $old, | |
| $new | |||
| ) |
Get the number of revisions between the given revision IDs.
| int | $old | Revision ID. |
| int | $new | Revision ID. |
Definition at line 2364 of file Title.php.
References getArticleID().
Here is the call graph for this function:| Title::equals | ( | $title | ) |
Compare with another title.
| Title | $title |
Definition at line 2382 of file Title.php.
References getDBkey(), getInterwiki(), and getNamespace().
Referenced by isValidMoveOperation().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Escape a text fragment, say from a link, for a URL.
Definition at line 484 of file Title.php.
References Sanitizer\decodeCharReferences().
Referenced by getFragmentForURL().
Here is the call graph for this function:
Here is the caller graph for this function:| Title::escapeFullURL | ( | $query = '' | ) |
Get an HTML-escaped version of the URL form, suitable for using in a link, including the server name and fragment.
| string | $query | an optional query string |
Definition at line 871 of file Title.php.
References $query, and getFullURL().
Here is the call graph for this function:| Title::escapeLocalURL | ( | $query = '' | ) |
Get an HTML-escaped version of the URL form, suitable for using in a link, without a server name or fragment.
| string | $query | an optional query string |
Definition at line 859 of file Title.php.
References $query, and getLocalURL().
Here is the call graph for this function:| Title::exists | ( | ) |
Check if page exists.
Definition at line 2394 of file Title.php.
References getArticleID().
Referenced by getRestrictions(), isSemiProtected(), and isValidMoveOperation().
Here is the call graph for this function:
Here is the caller graph for this function:| Title::fixSpecialName | ( | ) |
If the Title refers to a special page alias which is not the local default, returns a new Title which points to the local default.
Otherwise, returns $this.
Definition at line 2531 of file Title.php.
References getNamespace(), makeTitle(), and NS_SPECIAL.
Here is the call graph for this function:| Title::getArticleID | ( | $flags = 0 | ) |
Get the article ID for this Title from the link cache, adding it if necessary.
| int | $flags | a bit field; may be GAID_FOR_UPDATE to select for update |
Definition at line 1426 of file Title.php.
References $mArticleID, and GAID_FOR_UPDATE.
Referenced by countRevisionsBetween(), exists(), getLatestRevID(), getNextRevisionID(), getParentCategories(), getPreviousRevisionID(), isValidMoveOperation(), loadRestrictions(), loadRestrictionsFromRow(), moveTo(), and moveToNewTitle().
Here is the caller graph for this function:| Title::getBaseText | ( | ) |
Get the base name, i.e.
the leftmost parts before the /
Definition at line 672 of file Title.php.
References $parts, and getText().
Here is the call graph for this function:| Title::getBrokenLinksFrom | ( | $options = '' | ) |
Get an array of Title objects referring to non-existent articles linked from this page.
| string | $options | may be FOR UPDATE |
Definition at line 1822 of file Title.php.
References $res, and makeTitle().
Here is the call graph for this function:| Title::getDBkey | ( | ) |
Get the main part with underscores.
Definition at line 520 of file Title.php.
References $mDbkeyform.
Referenced by equals(), getLinksTo(), getTouched(), invalidateCache(), isDeleted(), isSpecial(), and isValidMoveOperation().
Here is the caller graph for this function:| Title::getDefaultNamespace | ( | ) |
Get the default namespace index, for when there is no namespace.
Definition at line 611 of file Title.php.
References $mDefaultNamespace.
| Title::getEditURL | ( | ) |
Get the edit URL for this Title.
Definition at line 898 of file Title.php.
References getLocalURL().
Here is the call graph for this function:| Title::getEscapedText | ( | ) |
Get the HTML-escaped displayable text form.
Used for the title field in tags.
Definition at line 913 of file Title.php.
References getPrefixedText().
Here is the call graph for this function:| Title::getFragment | ( | ) |
Get the Title fragment (i.e.
the bit after the #) in text form
Definition at line 591 of file Title.php.
References $mFragment.
| Title::getFragmentForURL | ( | ) |
Get the fragment in URL form, including the "#" character if there is one.
Definition at line 599 of file Title.php.
References escapeFragmentForURL().
Referenced by getFullURL().
Here is the call graph for this function:
Here is the caller graph for this function:| Title::getFullText | ( | ) |
Get the prefixed title with spaces, plus any fragment (part beginning with '#')
Definition at line 659 of file Title.php.
References $mFragment, and getPrefixedText().
Referenced by getParentCategories().
Here is the call graph for this function:
Here is the caller graph for this function:| Title::getFullURL | ( | $query = '', |
|
$variant = false |
|||
| ) |
Get a real URL referring to this title, with interwiki link and fragment.
| string | $query | an optional query string, not used for interwiki links |
| string | $variant | language variant of url (for sr, zh..) |
Definition at line 741 of file Title.php.
References $namespace, $query, $url, getFragmentForURL(), getInterwikiLink(), getLocalURL(), and getNsText().
Referenced by escapeFullURL(), getLocalURL(), and trackbackRDF().
Here is the call graph for this function:
Here is the caller graph for this function:| Title::getIndexTitle | ( | ) |
| Title::getInternalURL | ( | $query = '', |
|
$variant = false |
|||
| ) |
Get the URL form for an internal link.
| string | $query | an optional query string |
| string | $variant | language variant of url (for sr, zh..) |
Definition at line 885 of file Title.php.
References $query, $url, and getLocalURL().
Referenced by getSquidURLs().
Here is the call graph for this function:
Here is the caller graph for this function:| Title::getInterwiki | ( | ) |
Get the namespace text of the subject (rather than talk) page.
Definition at line 583 of file Title.php.
References $mInterwiki.
Referenced by equals().
Here is the caller graph for this function:
|
static |
Fetch interwiki prefix data from local cache in constant database.
More logic is explained in DefaultSettings
Definition at line 406 of file Title.php.
References $interwikiCache, ILIAS\LTI\ToolProvider\$key, $url, ILIAS\Repository\int(), and ILIAS\Repository\object().
Referenced by getInterwikiLink().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Returns the URL associated with an interwiki prefix.
| string | $key | the interwiki prefix (e.g. "MeatBall") |
Definition at line 347 of file Title.php.
References $interwikiCache, ILIAS\LTI\ToolProvider\$key, $res, getInterwikiCached(), and ILIAS\Repository\object().
Referenced by getFullURL(), isLocal(), isTrans(), and secureAndSplit().
Here is the call graph for this function:
Here is the caller graph for this function:| Title::getLatestRevID | ( | ) |
Definition at line 1441 of file Title.php.
References $mLatestID, and getArticleID().
Here is the call graph for this function:| Title::getLinksTo | ( | $options = '', |
|
$table = 'pagelinks', |
|||
$prefix = 'pl' |
|||
| ) |
Get a Title object associated with the talk page of this article.
WARNING: do not use this function on arbitrary user-supplied titles! On heavily-used templates it will max out the memory.
| string | $options | may be FOR UPDATE |
Definition at line 1767 of file Title.php.
References $res, getDBkey(), getNamespace(), and makeTitle().
Referenced by getTemplateLinksTo().
Here is the call graph for this function:
Here is the caller graph for this function:| Title::getLocalURL | ( | $query = '', |
|
$variant = false |
|||
| ) |
Get a URL with no fragment or server name.
If this page is generated with action=render, $wgServer is prepended.
| string | $query | an optional query string; if not specified, $wgArticlePath will be used. |
| string | $variant | language variant of url (for sr, zh..) |
Definition at line 781 of file Title.php.
References $query, $url, getFullURL(), getPrefixedDBkey(), and isExternal().
Referenced by escapeLocalURL(), getEditURL(), getFullURL(), and getInternalURL().
Here is the call graph for this function:
Here is the caller graph for this function:| Title::getNamespace | ( | ) |
Get the namespace index, i.e.
one of the NS_xxxx constants
Definition at line 528 of file Title.php.
References $mNamespace.
Referenced by equals(), fixSpecialName(), getLinksTo(), getNamespaceKey(), getTouched(), invalidateCache(), isDeleted(), isProtected(), isSpecial(), touchLinks(), and userCanRead().
Here is the caller graph for this function:| Title::getNamespaceKey | ( | ) |
Generate strings used for xml 'id' names in monobook tabs.
Definition at line 2475 of file Title.php.
References getNamespace(), NS_MAIN, and NS_SPECIAL.
Here is the call graph for this function:| Title::getNextRevisionID | ( | $revision | ) |
Get the revision ID of the next revision.
| int | $revision | Revision ID. Get the revision that was after this one. |
Definition at line 2347 of file Title.php.
References getArticleID().
Here is the call graph for this function:| Title::getNsText | ( | ) |
Get the namespace text.
Definition at line 536 of file Title.php.
References $mNamespace.
Referenced by getFullURL(), and prefix().
Here is the caller graph for this function:| Title::getParentCategories | ( | ) |
Get categories to which this Title belongs and return an array of categories' names.
Definition at line 2259 of file Title.php.
References $data, $res, getArticleID(), and getFullText().
Referenced by getParentCategoryTree().
Here is the call graph for this function:
Here is the caller graph for this function:| Title::getParentCategoryTree | ( | $children = array() | ) |
Get a tree of parent categories.
| array | $children | an array with the children in the keys, to check for circular refs |
Definition at line 2292 of file Title.php.
References getParentCategories(), and newFromText().
Here is the call graph for this function:| Title::getPartialURL | ( | ) |
| Title::getPrefixedDBkey | ( | ) |
Get the prefixed database key form.
Definition at line 631 of file Title.php.
References prefix().
Referenced by getLocalURL(), moveToNewTitle(), and resetArticleID().
Here is the call graph for this function:
Here is the caller graph for this function:| Title::getPrefixedText | ( | ) |
Get the prefixed title with spaces.
This is the form usually used for display
Definition at line 643 of file Title.php.
References $mPrefixedText, and prefix().
Referenced by getEscapedText(), getFullText(), moveToNewTitle(), and userCanRead().
Here is the call graph for this function:
Here is the caller graph for this function:| Title::getPrefixedURL | ( | ) |
Get a URL-encoded title (not an actual URL) including interwiki.
Definition at line 718 of file Title.php.
References prefix().
Here is the call graph for this function:| Title::getPreviousRevisionID | ( | $revision | ) |
Get the revision ID of the previous revision.
| int | $revision | Revision ID. Get the revision that was before this one. |
Definition at line 2331 of file Title.php.
References getArticleID().
Here is the call graph for this function:| Title::getRestrictions | ( | $action | ) |
Accessor/initialisation for mRestrictions.
| string | $action | action that permission needs to be checked for |
Definition at line 1382 of file Title.php.
References exists(), and loadRestrictions().
Referenced by isProtected(), isSemiProtected(), and userCan().
Here is the call graph for this function:
Here is the caller graph for this function:| Title::getSkinFromCssJsSubpage | ( | ) |
Trim down a .css or .js subpage title to get the corresponding skin name.
Definition at line 1238 of file Title.php.
| Title::getSquidURLs | ( | ) |
Get a list of URLs to purge from the Squid cache when this page changes.
Definition at line 1862 of file Title.php.
References getInternalURL().
Referenced by purgeSquid().
Here is the call graph for this function:
Here is the caller graph for this function:| Title::getSubpageText | ( | ) |
Get the lowest-level subpage name, i.e.
the rightmost part after /
Definition at line 691 of file Title.php.
References $parts.
Referenced by getSubpageUrlForm().
Here is the caller graph for this function:| Title::getSubpageUrlForm | ( | ) |
Get a URL-encoded form of the subpage text.
Definition at line 706 of file Title.php.
References getSubpageText(), and ILIAS\UI\examples\Symbol\Glyph\Up\up().
Here is the call graph for this function:| Title::getTemplateLinksTo | ( | $options = '' | ) |
Get an array of Title objects using this Title as a template Also stores the IDs in the link cache.
WARNING: do not use this function on arbitrary user-supplied titles! On heavily-used templates it will max out the memory.
| string | $options | may be FOR UPDATE |
Definition at line 1811 of file Title.php.
References getLinksTo().
Here is the call graph for this function:| Title::getText | ( | ) |
Simple accessors.
Get the text form (spaces not underscores) of the main part
Definition at line 504 of file Title.php.
References $mTextform.
Referenced by getBaseText(), isSubpage(), and trackbackRDF().
Here is the caller graph for this function:| Title::getTouched | ( | ) |
Get the last touched timestamp.
Definition at line 2430 of file Title.php.
References getDBkey(), and getNamespace().
Here is the call graph for this function:| Title::invalidateCache | ( | ) |
Updates page_touched for this page; called from LinksUpdate.php.
Definition at line 1484 of file Title.php.
References getDBkey(), and getNamespace().
Here is the call graph for this function:| Title::isAlwaysKnown | ( | ) |
Should a link should be displayed as a known link, just based on its title?
Currently, a self-link with a fragment and special pages are in this category. Special pages never exist in the database.
Definition at line 2405 of file Title.php.
References $mDbkeyform, isExternal(), and NS_SPECIAL.
Here is the call graph for this function:| Title::isCssSubpage | ( | ) |
| Title::isDeleted | ( | ) |
Is there a version of this page in the deletion archive?
Definition at line 1398 of file Title.php.
References getDBkey(), and getNamespace().
Here is the call graph for this function:| Title::isExternal | ( | ) |
Is this Title interwiki?
Definition at line 922 of file Title.php.
Referenced by getLocalURL(), and isAlwaysKnown().
Here is the caller graph for this function:| Title::isJsSubpage | ( | ) |
| Title::isLocal | ( | ) |
Determine whether the object refers to a page within this project.
Definition at line 452 of file Title.php.
References $interwikiCache, and getInterwikiLink().
Here is the call graph for this function:| Title::isProtected | ( | $action = '' | ) |
Does the title correspond to a protected article?
| string | $what | the action the page is protected from, by default checks move and edit |
Definition at line 960 of file Title.php.
References getNamespace(), getRestrictions(), and NS_SPECIAL.
Here is the call graph for this function:| Title::isSemiProtected | ( | $action = 'edit' | ) |
Is this page "semi-protected" - the only protection is autoconfirm?
| string | Action to check (default: edit) |
Definition at line 933 of file Title.php.
References exists(), and getRestrictions().
Here is the call graph for this function:| Title::isSpecial | ( | $name | ) |
Returns true if this title resolves to the named special page.
| string | $name | The special page name |
Definition at line 2516 of file Title.php.
References $name, getDBkey(), getNamespace(), and NS_SPECIAL.
Referenced by userCanRead().
Here is the call graph for this function:
Here is the caller graph for this function:| Title::isSubpage | ( | ) |
Is this a talk page of some sort?
Definition at line 1224 of file Title.php.
References getText().
Here is the call graph for this function:| Title::isTrans | ( | ) |
Determine whether the object refers to a page within this project and is transcludable.
Definition at line 470 of file Title.php.
References $interwikiCache, and getInterwikiLink().
Here is the call graph for this function:| Title::isValidMoveOperation | ( | $nt, | |
$auth = true |
|||
| ) |
Check whether a given move operation would be valid.
Returns true if ok, or a message key string for an error message if invalid. (Scarrrrry ugly interface this.)
| Title | &$nt | the new title |
| bool | $auth | indicates whether $wgUser's permissions should be checked |
Definition at line 1913 of file Title.php.
References $auth, equals(), exists(), getArticleID(), getDBkey(), isValidMoveTarget(), and userCan().
Referenced by moveTo().
Here is the call graph for this function:
Here is the caller graph for this function:| Title::isValidMoveTarget | ( | $nt | ) |
Checks if $this can be moved to a given Title.
| Title | &$nt | the new title to check |
Definition at line 2197 of file Title.php.
References $id, and newFromText().
Referenced by isValidMoveOperation().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Get a regex character class describing the legal characters in a link.
Definition at line 316 of file Title.php.
Referenced by secureAndSplit().
Here is the caller graph for this function:| Title::loadRestrictions | ( | $oldFashionedRestrictions = null | ) |
Definition at line 1347 of file Title.php.
References $res, getArticleID(), and loadRestrictionsFromRow().
Referenced by areRestrictionsCascading(), and getRestrictions().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Loads a string into mRestrictions array.
| resource | $res | restrictions as an SQL result. |
Definition at line 1285 of file Title.php.
References $res, getArticleID(), and purgeExpiredRestrictions().
Referenced by loadRestrictions().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Definition at line 332 of file Title.php.
Referenced by makeTitleSafe(), and nameOf().
Here is the caller graph for this function:
|
static |
Create a new Title from a namespace index and a DB key.
It's assumed that $ns and $title are valid, for instance when they came directly from the database or a special page name. For convenience, spaces are converted to underscores so that eg user_text fields can be used directly.
| int | $ns | the namespace of the article |
| string | $title | the unprefixed database key form |
Definition at line 243 of file Title.php.
Referenced by fixSpecialName(), getBrokenLinksFrom(), getLinksTo(), newFromID(), and newFromIDs().
Here is the caller graph for this function:
|
static |
Create a new Title from a namespace index and a DB key.
The parameters will be checked for validity, which is a bit slower than makeTitle() but safer for user-provided data.
| int | $ns | the namespace of the article |
| string | $title | the database key form |
Definition at line 265 of file Title.php.
References makeName().
Here is the call graph for this function:| Title::moveNoAuth | ( | & | $nt | ) |
Move this page without authentication.
Definition at line 1899 of file Title.php.
References moveTo().
Here is the call graph for this function:
|
private |
Move page to a title which is at present a redirect to the source page.
| Title | &$nt | the page to move to, which should currently be a redirect |
Definition at line 2037 of file Title.php.
Referenced by moveTo().
Here is the caller graph for this function:| Title::moveTo | ( | & | $nt, |
$auth = true, |
|||
$reason = '' |
|||
| ) |
Move a title to a new location.
| Title | &$nt | the new title |
| bool | $auth | indicates whether $wgUser's permissions should be checked |
Definition at line 1963 of file Title.php.
References $auth, ILIAS\LTI\ToolProvider\$reason, getArticleID(), isValidMoveOperation(), and moveOverExistingRedirect().
Referenced by moveNoAuth().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Move page to non-existing title.
Definition at line 2120 of file Title.php.
References $comment, $log, ILIAS\LTI\ToolProvider\$reason, ILIAS\Repository\get(), getArticleID(), getPrefixedDBkey(), getPrefixedText(), and purgeSquid().
Here is the call graph for this function:
|
static |
Get the prefixed DB key associated with an ID.
| int | $id | the page_id of the article |
@access public
Definition at line 298 of file Title.php.
References $id, and makeName().
Here is the call graph for this function:
|
static |
Create a new Title from a prefixed DB key.
| string | $key | The database key, which has underscores instead of spaces, possibly including namespace and interwiki prefixes |
Definition at line 92 of file Title.php.
References ILIAS\LTI\ToolProvider\$key.
|
static |
Create a new Title from an article ID.
| int | $id | the page_id corresponding to the Title to create |
Definition at line 194 of file Title.php.
References $id, and makeTitle().
Here is the call graph for this function:
|
static |
Make an array of titles from an array of IDs.
Definition at line 215 of file Title.php.
References $res, and makeTitle().
Here is the call graph for this function:
|
static |
Create a new Title from text, such as what one would find in a link.
Decodes any HTML entities in the text.
| string | $text | the link text; spaces, prefixes, and an initial ':' indicating the main namespace are accepted |
| int | $defaultNamespace | the namespace to use if none is specified by a prefix |
Wiki pages often contain multiple links to the same page. Title normalization and parsing can become expensive on pages with many links, so we can save a little time by caching them.
In theory these are value objects and won't get changed...
Convert things like é ā or 〗 into real text...
Definition at line 114 of file Title.php.
References $titleCache, Sanitizer\decodeCharReferences(), MW_TITLECACHE_MAX, and NS_MAIN.
Referenced by getParentCategoryTree(), isValidMoveTarget(), newMainPage(), and ilWikiUtil\processInternalLinks().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Create a new Title from URL-encoded text.
Ensures that the given title's length does not exceed the maximum.
| string | $url | the title, as might be taken from a URL |
Definition at line 165 of file Title.php.
References $url.
|
static |
Create a new Title for the Main Page.
Definition at line 280 of file Title.php.
References newFromText().
Here is the call graph for this function:| Title::pageCond | ( | ) |
| Title::prefix | ( | $name | ) |
Prefix some arbitrary text with the namespace or interwiki prefix of this object.
| string | $name | the text |
Definition at line 1521 of file Title.php.
References $name, and getNsText().
Referenced by getPrefixedDBkey(), getPrefixedText(), and getPrefixedURL().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Purge expired restrictions from the page_restrictions table.
Definition at line 1366 of file Title.php.
Referenced by loadRestrictionsFromRow().
Here is the caller graph for this function:| Title::purgeSquid | ( | ) |
Definition at line 1885 of file Title.php.
References getSquidURLs().
Referenced by moveToNewTitle().
Here is the call graph for this function:
Here is the caller graph for this function:| Title::quickUserCan | ( | $action | ) |
Can $wgUser perform $action on this page? This skips potentially expensive cascading permission checks.
Suitable for use for nonessential UI controls in common cases, but not for functional access control. May provide false positives, but should never provide a false negative.
| string | $action | action that permission needs to be checked for |
Definition at line 1018 of file Title.php.
References userCan().
Here is the call graph for this function:| Title::resetArticleID | ( | $newid | ) |
This clears some fields in this object, and clears any associated keys in the "bad links" section of the link cache.
| int | $newid | the new Article ID |
Definition at line 1466 of file Title.php.
References getPrefixedDBkey().
Here is the call graph for this function:
|
private |
Secure and split - main initialisation function for this object.
Assumes that mDbkeyform has been set, and is urldecoded and uses underscores, but not otherwise munged. This function removes illegal characters, splits off the interwiki and namespace prefixes, sets the other forms, and canonicalizes everything.
Pages with "/./" or "/../" appearing in the URLs will often be unreachable due to the way web browsers deal with 'relative' URLs. Forbid them explicitly.
Magic tilde sequences? Nu-uh!
Limit the size of titles to 255 bytes. This is typically the size of the underlying database field. We make an exception for special pages, which don't need to be stored in the database, and may edge over 255 bytes due to subpage syntax for long titles, e.g. [[Special:Block/Long name]]
Normally, all wiki links are forced to have an initial capital letter so [[foo]] and [[Foo]] point to the same place.
Don't force it for interwikis, since the other site might be case-sensitive.
Can't make a link to a namespace alone... "empty" local links can only be self-links with a fragment identifier.
Definition at line 1543 of file Title.php.
References $mDbkeyform, $mDefaultNamespace, getInterwikiLink(), legalChars(), NS_MAIN, NS_SPECIAL, setFragment(), and ilWikiUtil\wfUrlencode().
Here is the call graph for this function:| Title::setFragment | ( | $fragment | ) |
Set the fragment for this title This is kind of bad, since except for this rarely-used function, Title objects are immutable.
The reason this is here is because it's better than setting the members directly, which is what Linker::formatComment was doing previously.
| string | $fragment | text |
Definition at line 1734 of file Title.php.
Referenced by secureAndSplit().
Here is the caller graph for this function:| Title::touchLinks | ( | ) |
Update page_touched timestamps and send squid purge messages for pages linking to this title.
May be sent to the job queue depending on the number of links. Typically called on create and delete.
Definition at line 2416 of file Title.php.
References getNamespace().
Here is the call graph for this function:| Title::trackbackRDF | ( | ) |
Definition at line 2453 of file Title.php.
References $url, getFullURL(), getText(), and trackbackURL().
Here is the call graph for this function:| Title::trackbackURL | ( | ) |
Definition at line 2445 of file Title.php.
Referenced by trackbackRDF().
Here is the caller graph for this function:| Title::userCan | ( | $action, | |
$doExpensiveQueries = true |
|||
| ) |
Can $wgUser perform $action on this page?
| string | $action | action that permission needs to be checked for |
| bool | $doExpensiveQueries | Set this to false to avoid doing unnecessary queries. |
Definition at line 1029 of file Title.php.
References $mNamespace, getRestrictions(), and NS_SPECIAL.
Referenced by isValidMoveOperation(), quickUserCan(), userCanCreate(), userCanEdit(), and userCanMove().
Here is the call graph for this function:
Here is the caller graph for this function:| Title::userCanCreate | ( | $doExpensiveQueries = true | ) |
Can $wgUser create this page?
Definition at line 1142 of file Title.php.
References userCan().
Here is the call graph for this function:| Title::userCanEdit | ( | $doExpensiveQueries = true | ) |
Can $wgUser edit this page?
Definition at line 1132 of file Title.php.
References userCan().
Here is the call graph for this function:| Title::userCanEditCssJsSubpage | ( | ) |
Protect css/js subpages of user pages: can $wgUser edit this page?
Definition at line 1266 of file Title.php.
| Title::userCanMove | ( | $doExpensiveQueries = true | ) |
Can $wgUser move this page?
Definition at line 1152 of file Title.php.
References userCan().
Here is the call graph for this function:| Title::userCanRead | ( | ) |
Would anybody with sufficient privileges be able to move this page? Some pages just aren't movable.
Always grant access to the login page. Even anons need to be able to log in.
some pages are explicitly allowed
Definition at line 1173 of file Title.php.
References $name, getNamespace(), getPrefixedText(), isSpecial(), and NS_MAIN.
Here is the call graph for this function:| Title::userIsWatching | ( | ) |
Is $wgUser is watching this page?
Definition at line 995 of file Title.php.
References $mWatched, and NS_SPECIAL.
|
staticprivate |
Definition at line 32 of file Title.php.
Referenced by getInterwikiCached(), getInterwikiLink(), isLocal(), and isTrans().
| Title::$mArticleID |
Definition at line 50 of file Title.php.
Referenced by getArticleID().
| Title::$mCascadeRestriction |
Definition at line 53 of file Title.php.
Referenced by areRestrictionsCascading().
| Title::$mDbkeyform |
Definition at line 46 of file Title.php.
Referenced by getDBkey(), isAlwaysKnown(), and secureAndSplit().
| Title::$mDefaultNamespace |
Definition at line 59 of file Title.php.
Referenced by getDefaultNamespace(), and secureAndSplit().
| Title::$mFragment |
Definition at line 49 of file Title.php.
Referenced by getFragment(), and getFullText().
| Title::$mInterwiki |
Definition at line 48 of file Title.php.
Referenced by getInterwiki().
| Title::$mLatestID |
Definition at line 51 of file Title.php.
Referenced by getLatestRevID().
| Title::$mNamespace |
Definition at line 47 of file Title.php.
Referenced by getNamespace(), getNsText(), and userCan().
| Title::$mPrefixedText |
Definition at line 58 of file Title.php.
Referenced by getPrefixedText().
| Title::$mTextform |
| Title::$mUrlform |
Definition at line 45 of file Title.php.
Referenced by getPartialURL().
| Title::$mWatched |
Definition at line 61 of file Title.php.
Referenced by userIsWatching().
|
staticprivate |