[ Index ]
 

Code source de Plume CMS 1.2.2

Accédez au Source d'autres logiciels libres

Classes | Fonctions | Variables | Constantes | Tables

title

Body

[fermer]

/manager/inc/ -> class.website.php (sommaire)

(pas de description)

Poids: 679 lignes (33 kb)
Inclus ou requis:0 fois
Référencé: 0 fois
Nécessite: 0 fichiers

Définit 1 class

Website:: (9 méthodes):
  Website()
  generateId()
  set()
  check()
  checkFileRights()
  commit()
  website_exists()
  saveSite()
  delSite()


Classe: Website  - X-Ref

Storage of a website.

A website is not like the other resources as it needs some files
on disc to run (the configuration, the templates).
The result is that it is a little more complex to manage, thus this
Website class has more methods than for example the News class.
On the other side, it is still possible to use the standard methods
like set(), check(), commit(), remove() with all the ugly work
being hidden in background.
Website($data='')   X-Ref
Constructor

param: Array Data from a possible SQL query ('')

generateId($address)   X-Ref
Generate an id for a website from its web address.

Not always unique.

param: string Website address
return: string Id

set($name, $description, $format, $lang, $address,$path, $xmedia, $xmedia_path)   X-Ref
Set the data of the website.

param: string Name
param: string Description
param: string Format of the description
param: string Lang of the site
param: string Website address
param: string Website path on the file system
param: string Website xmedia address
param: string Website xmedia path on the file system
return: bool True

check()   X-Ref
Check if the given website is valid.

In case of failure the error message is set.

return: bool Success

checkFileRights()   X-Ref
Check the rights on the files and folders.

As some hosting environments are not providing the necessary rights
to write files and create folders, the check of those rights must be
done separately to have the possibility to install without touching
the files, and then do the file installation by hand.

return: bool Success

commit(&$log, $only_in_db=true)   X-Ref
Save the website.

It is possible to only save the data into the database without touching
the configuration files.
As during the process many files need to be updated a log is created and
it is possible to have the list of files to move/update by hand if
needed and not the rights to do it.

param: &array Associative array with the log of the process
param: bool Save only in the database (True)
return: bool Success

website_exists($id)   X-Ref
Check if a website with a given id exists.

param: string Id
return: mixed Id of the website if exists, empty string if not existing

saveSite($id, $name, $description, $sitelang, $website_address, $website_path, $xmedia_name, &$log_new_site, $force_new_id='')   X-Ref
Save a site or create a new one. If $id is empty, a new site
is created and the log of the creation is set in &$log_new_site.
The log is pure HTML ready for display.


delSite($id)   X-Ref
Pas de description



Généré le : Mon Nov 26 11:57:01 2007 par Balluche grâce à PHPXref 0.7
  Clicky Web Analytics