Simple singleton class that contains various functions and states representing the application.
Note: This class was named CmsObject before version 1.10
package |
CMS |
---|---|
license |
GPL |
since | 0.5 |
__construct()
get_instance()
get_installed_schema_version()
get_content_type()
If no content type is explicity set, text/html is assumed.
set_content_type(string $mime_type = '')
string
$mime_typeget_content_object()
get_content_id()
GetAvailableModules() : array<mixed,string>
This method will return an array of module names that are installed, loaded and ready for use. suotable for iteration with GetModuleInstance
array<mixed,string>
GetModuleInstance(string $module_name, string $version = '') : \CMSModule
This method will return a reference to the module object specified if it is installed, and available. Optionally, a version check can be performed to test if the version of the requeted module matches that specified.
string
$module_nameThe module name.
string
$version(optional) version number for a check.
Reference to the module object, or null.
GetDb() : \ADOConnection
\ADOConnection
a handle to the ADODB database object
GetDbPrefix() : string
string
GetConfig() : \cms_config
This object contains global paths and settings that do not belong in the database.
The configuration object.
GetModuleOperations() : \ModuleOperations
If it does not yet exist, this method will instantiate it.
handle to the ModuleOperations object
GetUserOperations() : \UserOperations
If it does not yet exist, this method will instantiate it.
handle to the UserOperations object
GetContentOperations() : \ContentOperations
If it does not yet exist, this method will instantiate it.
handle to the ContentOperations object
GetBookmarkOperations() : \BookmarkOperations
If it does not yet exist, this method will instantiate it.
handle to the BookmarkOperations object, useful only in the admin
GetGroupOperations() : \GroupOperations
If it does not yet exist, this method will instantiate it.
handle to the GroupOperations object
GetUserTagOperations() : \UserTagOperations
If it does not yet exist, this method will instantiate it.
handle to the UserTagOperations object
GetSmarty() : \Smarty_CMS
If it does not yet exist, this method will instantiate it.
\Smarty_CMS
handle to the Smarty object
GetHierarchyManager() : \HierarchyManager
If it does not yet exist, this method will instantiate it.
\HierarchyManager
handle to the HierarchyManager object
test_state(string $state) : boolean
This method will throw an exception if invalid data is passed in.
string
$stateA valid state name (see the state list above). It is recommended that the class constants be used.
boolean
get_states() : array<mixed,\stringp>
array<mixed,\stringp>
Array of state strings, or null.
is_frontend_request() : boolean
boolean
is_https_request() : boolean
boolean
STATE_ADMIN_PAGE
STATE_INSTALL
STATE_STYLESHEET
STATE_PARSE_TEMPLATE