Class CMS_websitesCatalog

Description

Class CMS_websitesCatalog

Manages the collection of websites.

Located in /automne/classes/tree/websitescatalog.php (line 26)

CMS_grandFather
   |
   --CMS_websitesCatalog
Method Summary
 static boolean exists (integer $id)
 static array(CMS_website) getAll ([ $orderby = 'label'], string $orderby,)
 static CMS_website getByCodename (string $codename)
 static CMS_website getByID (integer $id)
 static string getCurrentDomain ([mixed $currentPage = ''])
 static string getMainURL ()
 static CMS_website getWebsiteFromDomain (string $domain, [ &$isAlt = false])
 static CMS_website getWebsiteFromRoot (CMS_page|integer $root)
 static array(CMS_website) getWebsitesFromDomain (string $domain, [ &$isAlt = false])
 static CMS_website getWebsiteValue (integer $id, string $type)
 static boolean isWebsiteRoot (inetger $pageID)
 static boolean setOrders (array $websitesIDsOrdered)
 static boolean writeRootRedirection ()
Methods
static exists (line 170)

Check if website currently exists Static function.

  • access: public
static boolean exists (integer $id)
  • integer $id: The DB ID of the CMS_website to check
static getAll (line 139)

Returns all the websites, sorted by label.

Static function.

  • access: public
static array(CMS_website) getAll ([ $orderby = 'label'], string $orderby,)
  • string $orderby,: order of the websites returned in : label (default) or id
  • $orderby
static getByCodename (line 54)

Returns a CMS_website by a given codename Static function.

  • return: or false on failure to find it
  • access: public
static CMS_website getByCodename (string $codename)
  • string $codename: The codename of the wanted CMS_website
static getByID (line 35)

Returns a CMS_website when given an ID Static function.

  • return: or false on failure to find it
  • access: public
static CMS_website getByID (integer $id)
  • integer $id: The DB ID of the wanted CMS_website
static getCurrentDomain (line 214)

Returns The URL of the current website, according to parameter or constant CURRENT_PAGE or the main domain URL if constant does not exists Static function.

  • return: The current website URL
  • access: public
static string getCurrentDomain ([mixed $currentPage = ''])
  • mixed $currentPage: : The current page id or CMS_page
static getMainURL (line 197)

Returns The URL of the main website, the one for the root. Don't produce any error here, or the log will be filled in no time.

Static function.

  • return: The main URL
  • access: public
static string getMainURL ()
static getMainWebsite (line 246)

Returns The main website, the one for the root.

Static function.

  • return: the main website
  • access: public
static CMS_website getMainWebsite ()
static getWebsiteFromDomain (line 366)

get first website for a given domain or false if none founded

  • return: or false
  • access: public
static CMS_website getWebsiteFromDomain (string $domain, [ &$isAlt = false])
  • string $domain: : the domain to found website of
  • &$isAlt
static getWebsiteFromRoot (line 298)

Returns The instance of the website whose page is a root of, or false if page is not a website root Static function.

  • return: the website whose page is a root, or false
  • access: public
static CMS_website getWebsiteFromRoot (CMS_page|integer $root)
  • CMS_page|integer $root: The supposed root page or root page ID
static getWebsitesFromDomain (line 391)

get websites for a given domain or false if none founded

  • access: public
static array(CMS_website) getWebsitesFromDomain (string $domain, [ &$isAlt = false])
  • string $domain: : the domain to found website of
  • &$isAlt
static getWebsiteValue (line 84)

Returns a queried CMS_website value Static function.

  • return: value or false on failure to find it
  • access: public
static CMS_website getWebsiteValue (integer $id, string $type)
  • integer $id: The DB ID of the wanted CMS_website
  • string $type: The value type to get
static isWebsiteRoot (line 268)

Returns true if the pageID passed in parameter is the root of a website Static function.

  • access: public
static boolean isWebsiteRoot (inetger $pageID)
  • inetger $pageID: The supposed root page
static setOrders (line 334)

Reset websites order

  • return: true on success, false on failure
  • access: public
static boolean setOrders (array $websitesIDsOrdered)
  • array $websitesIDsOrdered: : the websites IDs ordered
static writeRootRedirection (line 417)

Writes the website root redirection : an index.php page redirecting to the root page

  • return: true on success, false on failure
  • access: public
static boolean writeRootRedirection ()

Inherited Methods

Inherited From CMS_grandFather

 CMS_grandFather::autoload()
 CMS_grandFather::hasError()
 CMS_grandFather::log()
 CMS_grandFather::PHPErrorHandler()
 CMS_grandFather::raiseError()
 CMS_grandFather::setDebug()
 CMS_grandFather::setLog()
 CMS_grandFather::_raiseError()
 CMS_grandFather::__call()
Class Constants

Documentation generated on Wed, 15 Feb 2012 15:41:08 +0100 by phpDocumentor 1.4.3