80 if ( $this->
hasSite( $site->getGlobalId() ) ) {
84 $this->byGlobalId[$site->getGlobalId()] = $index;
85 $this->byInternalId[$site->getInternalId()] = $index;
87 $ids = $site->getNavigationIds();
88 foreach ( $ids as $navId ) {
89 $this->byNavigationId[
$navId] = $index;
103 if ( $this->offsetExists( $index ) ) {
107 $site = $this->offsetGet( $index );
109 unset( $this->byGlobalId[$site->getGlobalId()] );
110 unset( $this->byInternalId[$site->getInternalId()] );
112 $ids = $site->getNavigationIds();
113 foreach ( $ids as $navId ) {
114 unset( $this->byNavigationId[$navId] );
118 parent::offsetUnset( $index );
155 return $this->offsetGet( $this->byGlobalId[$globalSiteId] );
167 $this->
offsetUnset( $this->byGlobalId[$globalSiteId] );
178 return $this->byGlobalId === [];
203 return $this->offsetGet( $this->byInternalId[$id] );
240 return $this->offsetGet( $this->byNavigationId[$id] );
282 foreach ( $this as $site ) {
299 const SERIAL_VERSION_ID =
'2014-03-17';
311 return self::SERIAL_VERSION_ID .
'+Site:' . Site::SERIAL_VERSION_ID;
325 parent::getSerializationData(),
327 'internalIds' => $this->byInternalId,
328 'globalIds' => $this->byGlobalId,
329 'navigationIds' => $this->byNavigationId
344 $serializationData = parent::unserialize( $serialization );
346 $this->byInternalId = $serializationData[
'internalIds'];
347 $this->byGlobalId = $serializationData[
'globalIds'];
348 $this->byNavigationId = $serializationData[
'navigationIds'];
and that you know you can do these things To protect your we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights These restrictions translate to certain responsibilities for you if you distribute copies of the or if you modify it For if you distribute copies of such a whether gratis or for a you must give the recipients all the rights that you have You must make sure that receive or can get the source code And you must show them these terms so they know their rights We protect your rights with two and(2) offer you this license which gives you legal permission to copy
removeSite( $globalSiteId)
Removes the site with the specified global site identifier.
isEmpty()
Returns if the list contains no sites.
removeSiteByInternalId( $id)
Removes the site with the specified 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.
getGlobalIdentifiers()
Returns all the global site identifiers.
setSite(Site $site)
Sets a site in the list.
array $byInternalId
Internal site identifiers pointing to their sites offset value.
array $byGlobalId
Global site identifiers pointing to their sites offset value.
getSiteByNavigationId( $id)
Returns the Site with the provided navigational site id.
getGroup( $groupName)
Returns the sites that are in the provided group.
removeSiteByNavigationId( $id)
Removes the site with the specified navigational site id.
static getSerialVersionId()
Returns the version ID that identifies the serialization structure used by getSerializationData() and...
array $byNavigationId
Navigational site identifiers alias inter-language prefixes pointing to their sites offset value.
hasSite( $globalSiteId)
Returns if the list contains the site with the provided global site identifier.
getSite( $globalSiteId)
Returns the Site with the provided global site identifier.
getSiteByInternalId( $id)
Returns the Site with the provided site id.
unserialize( $serialization)
preSetElement( $index, $site)
The wiki should then use memcached to cache various data To use multiple just add more items to the array To increase the weight of a make its entry a array("192.168.0.1:11211", 2))