MediaWiki  REL1_24
SiteList Class Reference
Inheritance diagram for SiteList:
Collaboration diagram for SiteList:

List of all members.

Public Member Functions

 getGlobalIdentifiers ()
 Returns all the global site identifiers.
 getGroup ($groupName)
 Returns the sites that are in the provided group.
 getObjectType ()
 getSite ($globalSiteId)
 Returns the Site with the provided global site identifier.
 getSiteByInternalId ($id)
 Returns the Site with the provided site id.
 getSiteByNavigationId ($id)
 Returns the Site with the provided navigational site id.
 hasInternalId ($id)
 Returns if the list contains the site with the provided site id.
 hasNavigationId ($id)
 Returns if the list contains the site with the provided navigational site id.
 hasSite ($globalSiteId)
 Returns if the list contains the site with the provided global site identifier.
 isEmpty ()
 Returns if the list contains no sites.
 offsetUnset ($index)
 removeSite ($globalSiteId)
 Removes the site with the specified global site identifier.
 removeSiteByInternalId ($id)
 Removes the site with the specified site id.
 removeSiteByNavigationId ($id)
 Removes the site with the specified navigational site id.
 setSite (Site $site)
 Sets a site in the list.
 unserialize ($serialization)

Static Public Member Functions

static getSerialVersionId ()
 Returns the version ID that identifies the serialization structure used by getSerializationData() and unserialize(), including the structure of any nested structures.

Public Attributes

const SERIAL_VERSION_ID = '2014-03-17'

Protected Member Functions

 getSerializationData ()
 preSetElement ($index, $site)

Protected Attributes

array $byGlobalId = array()
 Global site identifiers pointing to their sites offset value.
array $byInternalId = array()
 Internal site identifiers pointing to their sites offset value.
array $byNavigationId = array()
 Navigational site identifiers alias inter-language prefixes pointing to their sites offset value.

Detailed Description

Definition at line 29 of file SiteList.php.


Member Function Documentation

Returns all the global site identifiers.

Optionally only those belonging to the specified group.

Since:
1.21
Returns:
array

Definition at line 126 of file SiteList.php.

Referenced by SiteListTest\testGetGlobalIdentifiers(), and SiteListTest\testSerialization().

SiteList::getGroup ( groupName)

Returns the sites that are in the provided group.

Since:
1.21
Parameters:
string$groupName
Returns:
SiteList

Definition at line 273 of file SiteList.php.

See also:
GenericArrayObject::getObjectType
Since:
1.21
Returns:
string

Reimplemented from GenericArrayObject.

Definition at line 62 of file SiteList.php.

See also:
GenericArrayObject::getSerializationData
Since:
1.21
Returns:
array

Reimplemented from GenericArrayObject.

Definition at line 318 of file SiteList.php.

static SiteList::getSerialVersionId ( ) [static]

Returns the version ID that identifies the serialization structure used by getSerializationData() and unserialize(), including the structure of any nested structures.

This is useful for constructing cache keys in cases where the cache relies on serialization for storing the SiteList.

Returns:
string A string uniquely identifying the version of the serialization structure, including any sub-structures.

Definition at line 307 of file SiteList.php.

SiteList::getSite ( globalSiteId)

Returns the Site with the provided global site identifier.

The site needs to exist, so if not sure, call hasGlobalId first.

Since:
1.21
Parameters:
string$globalSiteId
Returns:
Site

Definition at line 151 of file SiteList.php.

Referenced by SiteListTest\testGetSiteByGlobalId().

Returns the Site with the provided site id.

The site needs to exist, so if not sure, call has first.

Since:
1.21
Parameters:
int$id
Returns:
Site

Definition at line 199 of file SiteList.php.

Returns the Site with the provided navigational site id.

The site needs to exist, so if not sure, call has first.

Since:
1.23
Parameters:
string$id
Returns:
Site

Definition at line 236 of file SiteList.php.

Returns if the list contains the site with the provided site id.

Parameters:
int$id
Returns:
bool

Definition at line 185 of file SiteList.php.

Returns if the list contains the site with the provided navigational site id.

Parameters:
string$id
Returns:
bool

Definition at line 222 of file SiteList.php.

SiteList::hasSite ( globalSiteId)

Returns if the list contains the site with the provided global site identifier.

Parameters:
string$globalSiteId
Returns:
bool

Definition at line 137 of file SiteList.php.

Returns if the list contains no sites.

Since:
1.21
Returns:
bool

Reimplemented from GenericArrayObject.

Definition at line 174 of file SiteList.php.

Referenced by SiteListTest\testIsEmpty().

SiteList::offsetUnset ( index)
See also:
ArrayObject::offsetUnset()
Since:
1.21
Parameters:
mixed$index

Definition at line 99 of file SiteList.php.

SiteList::preSetElement ( index,
site 
) [protected]
See also:
GenericArrayObject::preSetElement
Since:
1.21
Parameters:
int | string$index
Site$site
Returns:
bool

Reimplemented from GenericArrayObject.

Definition at line 76 of file SiteList.php.

SiteList::removeSite ( globalSiteId)

Removes the site with the specified global site identifier.

The site needs to exist, so if not sure, call hasGlobalId first.

Since:
1.21
Parameters:
string$globalSiteId

Definition at line 163 of file SiteList.php.

Removes the site with the specified site id.

The site needs to exist, so if not sure, call has first.

Since:
1.21
Parameters:
int$id

Definition at line 211 of file SiteList.php.

Removes the site with the specified navigational site id.

The site needs to exist, so if not sure, call has first.

Since:
1.23
Parameters:
string$id

Definition at line 248 of file SiteList.php.

SiteList::setSite ( Site site)

Sets a site in the list.

If the site was not there, it will be added. If it was, it will be updated.

Since:
1.21
Parameters:
Site$site

Definition at line 260 of file SiteList.php.

SiteList::unserialize ( serialization)
See also:
GenericArrayObject::unserialize
Since:
1.21
Parameters:
string$serialization
Returns:
array

Reimplemented from GenericArrayObject.

Definition at line 340 of file SiteList.php.


Member Data Documentation

array SiteList::$byGlobalId = array() [protected]

Global site identifiers pointing to their sites offset value.

Since:
1.21

Array of string

Definition at line 44 of file SiteList.php.

array SiteList::$byInternalId = array() [protected]

Internal site identifiers pointing to their sites offset value.

Since:
1.21

Array of integer

Definition at line 36 of file SiteList.php.

array SiteList::$byNavigationId = array() [protected]

Navigational site identifiers alias inter-language prefixes pointing to their sites offset value.

Since:
1.23

Array of string

Definition at line 53 of file SiteList.php.

const SiteList::SERIAL_VERSION_ID = '2014-03-17'

Definition at line 296 of file SiteList.php.


The documentation for this class was generated from the following file: