Jump to content

Manual:MWNamespace.php/es: Difference between revisions

From mediawiki.org
Content deleted Content added
FuzzyBot (talk | contribs)
Updating to match new version of source page
FuzzyBot (talk | contribs)
Updating to match new version of source page
 
Line 1: Line 1:
<languages/>
<languages/>
{{removed
|1.39 ([[phab:rMWea1c106ea9a3]])
|newvarname=NamespaceInfo.php
|newvarlink=Special:MyLanguage/Manual:NamespaceInfo.php
|deprecated=1.34
}}
{{MW file|MWNamespace.php|includes/|class1=MWNamespace}}
{{MW file|MWNamespace.php|includes/|class1=MWNamespace}}
<div lang="en" dir="ltr" class="mw-content-ltr">
'''MWNamespace.php''' contains the MWNamespace class, a utility class with only static functions for dealing with [[Special:MyLanguage/Manual:Namespace|namespaces]] that encodes all the "magic" behaviors of them based on index.
'''MWNamespace.php''' contains the MWNamespace class, a utility class with only static functions for dealing with [[Special:MyLanguage/Manual:Namespace|namespaces]] that encodes all the "magic" behaviors of them based on index.
</div>


<span id="Methods"></span>
==Métodos==
==Métodos==
*<code>MWNamespace::getCanonicalNamespaces( $rebuild )</code>: Returns array of all defined namespaces with their canonical (English) names.
* {{phpi|MWNamespace::getCanonicalNamespaces( $rebuild )}} - <span lang="en" dir="ltr" class="mw-content-ltr">Returns array of all defined namespaces with their canonical (English) names.</span>
*<code>MWNamespace::getCanonicalName( $index )</code>: Returns the canonical (English) name for a given index
* {{phpi|MWNamespace::getCanonicalName( $index )}} - <span lang="en" dir="ltr" class="mw-content-ltr">Returns the canonical (English) name for a given index</span>
*<code>MWNamespace::getValidNamespaces()</code>: Returns an array of the namespaces (by integer id) that exist on the wiki. Used primarily by the api in help documentation. This function calls <code>getCanonicalNamespaces()</code> without using the rebuild option and it then excludes the negative number namespaces, e.g. -1 (special page).
* {{phpi|MWNamespace::getValidNamespaces()}} - <span lang="en" dir="ltr" class="mw-content-ltr">Returns an array of the namespaces (by integer id) that exist on the wiki.</span> <span lang="en" dir="ltr" class="mw-content-ltr">Used primarily by the api in help documentation.</span> <span lang="en" dir="ltr" class="mw-content-ltr">This function calls {{phpi|getCanonicalNamespaces()}} without using the rebuild option and it then excludes the negative number namespaces, e.g. -1 (special page).</span>

<div lang="en" dir="ltr" class="mw-content-ltr">
==External links==
</div>
* [https://doc.wikimedia.org/mediawiki-core/REL1_34/php/classMWNamespace.html MWNamespace] - MediaWiki 1.34
* [https://doc.wikimedia.org/mediawiki-core/REL1_34/php/classNamespaceInfo.html NamespaceInfo.php] - MediaWiki 1.34

Latest revision as of 00:14, 25 February 2023

MWNamespace.php contains the MWNamespace class, a utility class with only static functions for dealing with namespaces that encodes all the "magic" behaviors of them based on index.

Métodos

  • MWNamespace::getCanonicalNamespaces( $rebuild ) - Returns array of all defined namespaces with their canonical (English) names.
  • MWNamespace::getCanonicalName( $index ) - Returns the canonical (English) name for a given index
  • MWNamespace::getValidNamespaces() - Returns an array of the namespaces (by integer id) that exist on the wiki. Used primarily by the api in help documentation. This function calls getCanonicalNamespaces() without using the rebuild option and it then excludes the negative number namespaces, e.g. -1 (special page).