Class CMS_website

Description

Class CMS_website

represent a website placed on a page in the tree structure. A websites defines mainly a directory where the pages files will be placed. Beware ! Because of the label-to-directory relationship, label should'nt be changeable after the website creation. This condition is enforced here.

Located in /automne/classes/tree/website.php (line 31)

CMS_grandFather
   |
   --CMS_website
Method Summary
 void __construct ([integer $id = 0])
 void destroy ()
 mixed get403 ([boolean $returnObject = true])
 mixed get404 ([boolean $returnObject = true])
 array(codename getAllPagesCodenames ()
 array getAltDomains ([ $includeHTTP = true])
 string getCodename ()
 string getHTMLPagesPath (string $relativeTo)
 integer getID ()
 string getLabel ()
 string getMeta (string $meta)
 string getPagesPath (string $relativeTo)
 string getURL ([ $includeHTTP = true])
 boolean isMain ()
 boolean redirectAltDomain ()
 boolean set403 (integer $pageId)
 boolean set404 (integer $pageId)
 boolean setAltDomains ( $domains, string $url)
 boolean setCodename (string $codename)
 boolean setLabel (string $label)
 boolean setMeta (string $meta, string $value)
 boolean setRedirectAltDomain (boolean $altredir)
 boolean setRoot (CMS_page $page)
 boolean setURL (string $url)
 boolean writeToPersistence ()
Methods
Constructor __construct (line 137)

Constructor.

initializes the website if the id is given.

  • access: public
void __construct ([integer $id = 0])
  • integer $id: DB id
destroy (line 617)

Totally destroys the website, including its directory After deletion from database, launch a regen of the whole tree.

  • access: public
void destroy ()
get403 (line 326)

Gets the 403 page

  • return: The 403 CMS_page object if any and public or false if none found
  • access: public
mixed get403 ([boolean $returnObject = true])
  • boolean $returnObject: Return a public CMS_page. If false, return only page Id (default : true)
get404 (line 288)

Gets the 404 page

  • return: The 404 CMS_page object if any and public or false if none found
  • access: public
mixed get404 ([boolean $returnObject = true])
  • boolean $returnObject: Return a public CMS_page. If false, return only page Id (default : true)
getAllPagesCodenames (line 732)

Get all pages codenames for website

  • return: => pageId)
  • access: public
array(codename getAllPagesCodenames ()
getAltDomains (line 449)

Gets the alternatives domains (including http://).

  • return: the URL of alternatives domains
  • access: public
array getAltDomains ([ $includeHTTP = true])
  • $includeHTTP
getCodename (line 363)

Gets the Codename

  • return: The Codename
  • access: public
string getCodename ()
getHTMLPagesPath (line 599)

Gets the pages directory. It's derived from the label

  • return: The pages directory.
  • access: public
string getHTMLPagesPath (string $relativeTo)
  • string $relativeTo: Can be PATH_RELATIVETO_WEBROOT for relative to website root, or PATH_RELATIVETO_FILESYSTEM for relative to filesystem root
getID (line 209)

Gets the DB ID of the instance.

  • return: the DB id
  • access: public
integer getID ()
getLabel (line 263)

Gets the label

  • return: The label
  • access: public
string getLabel ()
getMeta (line 221)

Get a website meta value

  • return: the website meta value
  • access: public
string getMeta (string $meta)
  • string $meta: The meta name to get
getPagesPath (line 563)

Gets the pages directory. It's derived from the label

  • return: The pages directory.
  • access: public
string getPagesPath (string $relativeTo)
  • string $relativeTo: Can be PATH_RELATIVETO_WEBROOT for relative to website root, or PATH_RELATIVETO_FILESYSTEM for relative to filesystem root
getRoot (line 527)

Gets the root page.

  • return: The Root page
  • access: public
CMS_page getRoot ()
getURL (line 406)

Gets the url (including http://).

  • return: the URL
  • access: public
string getURL ([ $includeHTTP = true])
  • $includeHTTP
isMain (line 252)

Is this the main website ?

  • access: public
boolean isMain ()
redirectAltDomain (line 502)

Should we redirect altdomains to main domain

  • access: public
boolean redirectAltDomain ()
set403 (line 348)

Sets the 403 page Id for the website

  • return: true on success, false on failure.
  • access: public
boolean set403 (integer $pageId)
  • integer $pageId: The 403 page Id to set
set404 (line 310)

Sets the 404 page Id for the website

  • return: true on success, false on failure.
  • access: public
boolean set404 (integer $pageId)
  • integer $pageId: The 404 page Id to set
setAltDomains (line 473)

Sets the alternatives domains url. Can be empty. Will be riden of http://.

  • return: true on success, false on failure.
  • access: public
boolean setAltDomains ( $domains, string $url)
  • string $url: The url to set
  • $domains
setCodename (line 375)

Sets the Codename.

  • return: true on success, false on failure.
  • access: public
boolean setCodename (string $codename)
  • string $codename: The Codename to set
setLabel (line 275)

Sets the label.

  • return: true on success, false on failure.
  • access: public
boolean setLabel (string $label)
  • string $label: The label to set
setMeta (line 237)

Set a website meta value

  • return: true on success, false on failure
  • access: public
boolean setMeta (string $meta, string $value)
  • string $meta: The meta name to set
  • string $value: The meta value to get
setRedirectAltDomain (line 514)

Sets the redirect altdomains to main domain status

  • return: true on success, false on failure.
  • access: public
boolean setRedirectAltDomain (boolean $altredir)
  • boolean $altredir: redirect status
setRoot (line 539)

Sets the root page.

  • return: true on success, false on failure
  • access: public
boolean setRoot (CMS_page $page)
  • CMS_page $page: The new root page to set.
setURL (line 426)

Sets the url. Can be empty. Will be riden of http://.

  • return: true on success, false on failure.
  • access: public
boolean setURL (string $url)
  • string $url: The url to set
writeToPersistence (line 658)

Writes the website into persistence (MySQL for now).

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

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:03 +0100 by phpDocumentor 1.4.3