|
|
|
|
Implements interface: HammerKit_ObjectInterface
This class describes and contains the functionality for adding, removing and managing sites and their attributes. A site is identified by its name, which is a unique string under one HammerKit domain.
unique string abspath Description: The datapath of the site on the server, like "/var/www/hammersites/sitename". Settable: no
time creation_time Description: The time at which the site was created. Settable: no
bytesize datasize Description: The size of the entire data folder under the site abspath. Settable: no
time expiration_time Description: The time when a non-permanent site expires. Settable: yes
time filesystem_creation_time Description: The time when the site folder was createde in the filesystem. Settable: no
unique string name Description: The name of the site. Settable: no
string type Description: The type of the site. Settable: no Possible values: "hidden", "paid", "expired" or "permanent"
time update_time Description: The time when the site content was last updated. Settable: yes
constructor __construct(string name)
Description: Creates a site object.
Arguments: name is the name of the site to create
Returns: a site object
string checkName(string name)
Description: Corrects a site name by replacing illegal characters with the underscore "_" and checks if the corrected site name is valid.
Arguments: name is the string name to check
Returns: the corrected site name string or FALSE if the corrected name is invalid and not usable as a site name
HammerKit_Site copy(string new_site_name [, mixed copy_usergroups])
Description: Makes a copy of the current site object.
Arguments: new_site_name is the string name of the new site to create, copy_usergroups determines if usergroups are copied to the new site - possible values are the strings "none", "all" or "local" (only groups marked local are copied) or an array containing the ids of the usergroups to copy - default value is "none"
Returns: the new site object on success and FALSE otherwise
integer(HammerKit_UserGroup) getAdminGroup(void)
Description: Get the group from the site that is marked as the administration group.
Returns: the usergroup id on success and FALSE otherwise
string getAttribute(string attribute [, boolean formatted [, array format_options]])
Description: see the description of the HammerkitObject interface
string[string[]] getAttributeList([string parameter])
Description: see the description of the HammerkitObject interface
mixed getSetting(string name)
Description: Get the value of a valid site setting.
Attributes: name is the name of a valid site setting
Returns: the setting's value on success and FALSE if the setting does not exist
array getSettingList(void)
Description: Get a list of all possible site settings
Returns: An array where the keys are the code names of the settings and the values are arrays with specifications of the setting.
string[](HammerKit_Site) getSiteList([string sort_attribute [, boolean reverse_order]])
Description: Get a list of all the sites on this HammerKit domain.
Arguments: sort_attribute is the site attribute by which to sort the list - default value is "name", reverse_order determines if the list is returned in reverse order - default value FALSE
Returns: an array of site names
boolean remove(void)
Description: see the description of the HammerkitObject interface
boolean setAttributes(array attributes)
Description: see the description of the HammerkitObject interface
boolean setSetting(string name, mixed value)
Description: Set a value for a site setting. A value of boolean FALSE will reset the setting to its default value.
Arguments: name is the name of the site setting to set, value is the value of the setting
Returns: TRUE on success and FALSE otherwise
|
� HammerKit Oy 2008 |
UPDATED: 26.01.2009 13:34 |
|