*/ interface SiteList extends Countable, Traversable, Serializable, ArrayAccess { /** * Returns all the global site identifiers. * Optionally only those belonging to the specified group. * * @since 1.21 * * @return array */ public function getGlobalIdentifiers(); /** * Returns if the list contains the site with the provided global site identifier. * * @param string $globalSiteId * * @return boolean */ public function hasSite( $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 * * @param string $globalSiteId * * @return Site */ public function getSite( $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 * * @param string $globalSiteId */ public function removeSite( $globalSiteId ); /** * Returns if the list contains the site with the provided site id. * * @param integer $id * * @return boolean */ public function hasInternalId( $id ); /** * Returns the Site with the provided site id. * The site needs to exist, so if not sure, call has first. * * @since 1.21 * * @param integer $id * * @return Site */ public function getSiteByInternalId( $id ); /** * Removes the site with the specified site id. * The site needs to exist, so if not sure, call has first. * * @since 1.21 * * @param integer $id */ public function removeSiteByInternalId( $id ); /** * 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 * * @param Site $site */ public function setSite( Site $site ); /** * Returns if the site list contains no sites. * * @since 1.21 * * @return boolean */ public function isEmpty(); }