[ Index ]

PHP Cross Reference of MediaWiki-1.24.0

title

Body

[close]

/includes/site/ -> SiteSQLStore.php (summary)

(no description)

File Size: 495 lines (11 kb)
Included or required:0 times
Referenced: 0 times
Includes or requires: 0 files

Defines 2 classes

SiteSQLStore:: (13 methods):
  newInstance()
  __construct()
  getCacheKey()
  getSites()
  siteFromRow()
  getRowFromSite()
  loadSites()
  getSite()
  saveSite()
  saveSites()
  reset()
  clear()
  newSitesTable()

Sites:: (3 methods):
  newSite()
  singleton()
  getSiteGroup()


Class: SiteSQLStore  - X-Ref

Represents the site configuration of a wiki.
Holds a list of sites (ie SiteList) and takes care
of retrieving and caching site information when appropriate.

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
http://www.gnu.org/copyleft/gpl.html

newInstance( ORMTable $sitesTable = null )   X-Ref

param: ORMTable|null $sitesTable
return: SiteStore

__construct( ORMTable $sitesTable = null )   X-Ref
Constructor.

param: ORMTable|null $sitesTable

getCacheKey()   X-Ref
Constructs a cache key to use for caching the list of sites.

This includes the concrete class name of the site list as well as a version identifier
for the list's serialization, to avoid problems when unserializing site lists serialized
by an older version, e.g. when reading from a cache.

The cache key also includes information about where the sites were loaded from, e.g.
the name of a database table.

return: string The cache key.

getSites( $source = 'cache' )   X-Ref

param: string $source Either 'cache' or 'recache'
return: SiteList

siteFromRow( ORMRow $siteRow )   X-Ref
Returns a new Site object constructed from the provided ORMRow.

param: ORMRow $siteRow
return: Site

getRowFromSite( Site $site )   X-Ref
Get a new ORMRow from a Site object

param: Site $site
return: ORMRow

loadSites()   X-Ref
Fetches the site from the database and loads them into the sites field.


getSite( $globalId, $source = 'cache' )   X-Ref

param: string $globalId
param: string $source
return: Site|null

saveSite( Site $site )   X-Ref

param: Site $site
return: bool Success indicator

saveSites( array $sites )   X-Ref

param: Site[] $sites
return: bool Success indicator

reset()   X-Ref
Purges the internal and external cache of the site list, forcing the list
of sites to be re-read from the database.


clear()   X-Ref
Clears the list of sites stored in the database.

return: bool Success

newSitesTable()   X-Ref

return: ORMTable

Class: Sites  - X-Ref


newSite( $globalId = false )   X-Ref
Factory for creating new site objects.

param: string|bool $globalId
return: Site

singleton()   X-Ref

return: SiteStore

getSiteGroup( $group )   X-Ref

param: string $group
return: SiteList



Generated: Fri Nov 28 14:03:12 2014 Cross-referenced by PHPXref 0.7.1