Functions

audit

audit(integer|null $item_id, string $subject, string $message) 

A convenience function in the root namespace to create a message using the current audit manager.

inherited

Arguments

integer|null $item_id

string $subject

string $message

cms_notice

cms_notice(string $msg, string $subject = null) 

A convenience function in the root namespace to create a notice message using the current audit manager.

inherited

Arguments

string $msg

string $subject

cms_warning

cms_warning(string $msg, string $subject = null) 

A convenience function in the root namespace to create a warning message using the current audit manager.

inherited

Arguments

string $msg

string $subject

cms_error

cms_error(string $msg, string $subject = null) 

A convenience function in the root namespace to create an error message using the current audit manager.

inherited

Arguments

string $msg

string $subject

NewDataDictionary

NewDataDictionary(\CMSMS\Database\Connection $conn) : \CMSMS\Database\DataDictionary

A method to create a new data dictionary object

inherited deprecated

Arguments

\CMSMS\Database\Connection $conn

The existing database connection.

Response

\CMSMS\Database\DataDictionary

cmsms

cmsms : \CmsApp

Return the global cmsms() object.

inherited

Response

\CmsApp

cms_db_prefix

cms_db_prefix : string

Returns the currently configured database prefix.

inherited

Response

string

get_preference

get_preference(integer $userid, string $prefname, mixed $default = '') : mixed

Retrieve the value of the named preference for the given userid.

inherited deprecated

Arguments

integer $userid

The user id

string $prefname

The preference name

mixed $default

The default value if the preference is not set for the given user id.

Response

mixed

set_preference

set_preference(integer $userid, string $prefname, mixed $value) 

Sets the given perference for the given userid with the given value.

inherited deprecated

Arguments

integer $userid

The user id

string $prefname

The preference name

mixed $value

The preference value (will be stored as a string)

get_userid

get_userid(boolean $redirect = true) : integer

Gets the userid of the currently logged in admin user.

inherited

If an effective uid has been set in the session, AND the primary user is a member of the admin group then allow emulating that effective uid.

Arguments

boolean $redirect

Redirect to the admin login page if the user is not logged in.

Response

integer

The UID of the logged in administrator, otherwise FALSE

get_username

get_username(boolean $check = true) : string

Gets the username of the currently logged in admin user.

inherited

If an effective username has been set in the session, AND the primary user is a member of the admin group then return the effective username.

Arguments

boolean $check

Redirect to the admin login page if the user is not logged in.

Response

string

the username of the logged in user.

check_login

check_login(string $no_redirect = false) : boolean

Checks to see if the user is logged in and the request has the proper key. If not, redirects the browser to the admin login.

inherited

Note: Because this method validates that the secret key is in the URL and matches the one that is in the session this method should only be called from admin actions.

Arguments

string $no_redirect

If true, then don't redirect if not logged in

Response

boolean

check_permission

check_permission(integer $userid = null, string $permname) : boolean

Checks to see that the given userid has access to the given permission.

inherited

Members of the admin group have all permissions.

Arguments

integer $userid

The user id

string $permname

The permission name

Response

boolean

get_site_preference

get_site_preference(string $prefname, mixed $defaultvalue = null) : mixed

Gets the given site prefernce

inherited deprecated

Arguments

string $prefname

The preference name

mixed $defaultvalue

The default value if the preference does not exist

Response

mixed

is_sitedown

is_sitedown : boolean

A convenience function to test if the site is marked as down according to the config panel.

inherited

This method includes handling the preference that indicates that site-down behaviour should be disabled for certain IP address ranges.

Response

boolean

lang_by_realm

lang_by_realm(string $realm, string $key) : string

Retrieve a translation for a specific string in a specific realm.

inherited

Called with the realm first, followed by the key, this method will attempt to load the specific realm data if necessary before doing translation.

This method accepts a variable number of arguments. Any arguments after the realm and the key are passed to the key via vsprintf

i.e: lang_by_realm('tasks','my_string');

Arguments

string $realm

The realm

string $key

The lang key and any vspring arguments.

Response

string

lang

lang(string $key) : string

Return a translated string for the default 'admin' realm.

inherited

This function is merely a wrapper around the lang_by_realm function that assumes the realm is 'admin'.

This method will throw a notice if it is called from a frontend request

i.e: lang('title');

Arguments

string $key

The key to translate and then any vsprintf arguments for the key.

Response

string

redirect

redirect(string $to) 

Redirects to relative URL on the current site.

inherited

If headers have not been sent this method will use header based redirection. Otherwise javascript redirection will be used.

Arguments

string $to

The url to redirect to

redirect_to_alias

redirect_to_alias(mixed $alias) 

Given a page ID or an alias, redirect to it.

inherited

Retrieves the URL of the specified page, and performs a redirect

Arguments

mixed $alias

An integer page id or a string page alias.

microtime_diff

microtime_diff(string $a, string $b) : integer

Calculate the difference in seconds between two microtime() values.

inherited

Arguments

string $a

Earlier microtime value

string $b

Later microtime value

Response

integer

The difference.

cms_join_path

cms_join_path : string

Joins a path together using platform specific directory separators.

inherited

Taken from: http://www.php.net/manual/en/ref.dir.php

This method should NOT be used for building URLS.

This method accepts a variable number of string arguments. i.e: $out = cms_join_path($dir1,$dir2,$dir3,$filename); or $out = cms_join_path($dir1,$dir2,$filename);

Response

string

cms_is_uri

cms_is_uri(string $in = null) : boolean

Test if a string provided is a URI

inherited

Arguments

string $in

The string to test

Response

boolean

cms_fix_path

cms_fix_path(string $in) : string

Convert a string to use platform specific separators IF it is not a uri.

inherited

Arguments

string $in

Response

string

cms_relative_path

cms_relative_path(string $in, string $relative_to = null) : string

Return the relative portion of a path

inherited

Arguments

string $in

The input path or file specification

string $relative_to

The optional path to compute relative to. If not supplied the cmsms root path will be used.

Response

string

The relative portion of the input string.

cms_htmlentities

cms_htmlentities(string $val = null, string $param = ENT_QUOTES, string $charset = "UTF-8", boolean $convert_single_quotes = false) : string

Perform HTML entity conversion on a string.

inherited

Arguments

string $val

The input string

string $param

A flag indicating how quotes should be handled (see htmlentities) (ignored)

string $charset

$val The input character set (ignored)

boolean $convert_single_quotes

A flag indicating wether single quotes should be converted to entities.

Response

string

the converted string.

debug_bt_to_log

debug_bt_to_log 

A function to output a backtrace into the generated log file.

inherited

debug_bt

debug_bt 

A function to generate a backtrace in a readable format.

inherited

This function does not return but echoes output.

debug_display

debug_display(mixed $var, string $title = "", boolean $echo_to_screen = true, boolean $use_html = true, boolean $showtitle = TRUE) : string

Debug function to display $var nicely in html.

inherited

Arguments

mixed $var

The data to display

string $title

(optional) title for the output. If null memory information is output.

boolean $echo_to_screen

(optional) Flag indicating wether the output should be echoed to the screen or returned.

boolean $use_html

(optional) flag indicating wether html or text should be used in the output.

boolean $showtitle

(optional) flag indicating wether the title field should be displayed in the output.

Response

string

debug_output

debug_output(mixed $var, string $title = "") 

Display $var nicely only if $config["debug"] is set.

inherited

Arguments

mixed $var

string $title

debug_to_log

debug_to_log(mixed $var, string $title = '', string $filename = '') 

Debug function to output debug information about a variable in a formatted matter to a debug file.

inherited

Arguments

mixed $var

data to display

string $title

optional title.

string $filename

optional output filename

debug_buffer

debug_buffer(mixed $var, string $title = "") 

Display $var nicely to the CmsApp::get_instance()->errors array if $config['debug'] is set.

inherited

Arguments

mixed $var

string $title

get_parameter_value

get_parameter_value(array $parameters, string $value, mixed $default_value = '', string $session_key = '') : mixed

Retrieve the $value from the $parameters array checking for $parameters[$value] and $params[$id.$value].

inherited

Returns $default if $value is not in $params array. Note: This function will also trim() string values.

Arguments

array $parameters

string $value

mixed $default_value

string $session_key

Response

mixed

is_directory_writable

is_directory_writable(string $path) : boolean

Check the permissions of a directory recursively to make sure that we have write permission to all files.

inherited

Arguments

string $path

Start directory.

Response

boolean

get_recursive_file_list

get_recursive_file_list(string $path, array $excludes, integer $maxdepth = -1, string $mode = "FULL", \d $d) : array<mixed,string>

Return an array containing a list of files in a directory performs a recursive search.

inherited

Arguments

string $path

Start Path.

array $excludes

Array of regular expressions indicating files to exclude.

integer $maxdepth

How deep to browse (-1=unlimited)

string $mode

"FULL"|"DIRS"|"FILES"

\d $d

for internal use only

Response

array<mixed,string>

recursive_delete

recursive_delete(string $dirname) : boolean

A function to recursively delete all files and folders in a directory; synonymous with rm -r.

inherited

Arguments

string $dirname

The directory name

Response

boolean

chmod_r

chmod_r(string $path, integer $mode) 

A function to recursively chmod all files and folders in a directory.

inherited

Arguments

string $path

The start location

integer $mode

The octal mode Rolf: only used in admin/listmodules.php

startswith

startswith(string $str, string $sub) : boolean

A convenience function to test wether one string starts with another.

inherited

i.e: startswith('The Quick Brown Fox','The');

Arguments

string $str

The string to test against

string $sub

The search string

Response

boolean

endswith

endswith(string $str, string $sub) : boolean

Similar to the startswith method, this function tests with string A ends with string B.

inherited

i.e: endswith('The Quick Brown Fox','Fox');

Arguments

string $str

The string to test against

string $sub

The search string

Response

boolean

munge_string_to_url

munge_string_to_url(string $alias, boolean $tolower = false, boolean $withslash = false) : string

Convert a human readable string into something that is suitable for use in URLS.

inherited

Arguments

string $alias

String to convert

boolean $tolower

Indicates whether output string should be converted to lower case

boolean $withslash

Indicates wether slashes should be allowed in the input.

Response

string

cleanString

cleanString(string $in) : string

Clean an input string Will encode unsafe characters as entities.

inherited

Arguments

string $in

Response

string

ini_get_boolean

ini_get_boolean(string $str) : integer

A convenience function to return a bool variable given a php ini key that represents a bool.

inherited

Arguments

string $str

The php ini key

Response

integer

stack_trace

stack_trace 

Another convenience function to output a human readable function stack trace.

inherited

This method uses echo.

cms_move_uploaded_file

cms_move_uploaded_file(string $tmpfile, string $destination) : \bool.

A wrapper around move_uploaded_file that attempts to ensure permissions on uploaded files are set correctly.

inherited

Arguments

string $tmpfile

The temporary file specification

string $destination

The destination file specification

Response

\bool.

cms_ipmatches

cms_ipmatches(string $ip, string|array $checklist) : boolean

A function to test wether an IP address matches a list of expressions.

inherited

Credits to J.Adams jna@retins.net

Expressions can be of the form xxx.xxx.xxx.xxx (exact) xxx.xxx.xxx.[yyy-zzz] (range) xxx.xxx.xxx.xxx/nn (nn = # bits, cisco style -- i.e. /24 = class C)

Arguments

string $ip

IP address to test

string|array $checklist

Array of match expressions

Response

boolean

Rolf: only used in lib/content.functions.php

is_email

is_email(string $email, boolean $checkDNS = false) : boolean

Test if the string provided is a valid email address.

inherited

Arguments

string $email

boolean $checkDNS

Response

boolean

cms_to_bool

cms_to_bool(string $str = null) 

A simple function to convert a string to a bool.

inherited

accepts, 'y','yes','true',1 as TRUE (case insensitive) all other values represent FALSE.

Arguments

string $str

Input string to test. Rolf: only used in lib/classes/contenttypes/Content.inc.php

is_base64

is_base64(string $s) : boolean

Test if a string is a base64 encoded string

inherited

Arguments

string $s

The input string

Response

boolean

cms_create_guid

cms_create_guid : string

Create a unique GUID.

inherited

Response

string

Constants

CMS_ADODB_DT

CMS_ADODB_DT 

A constant to assist with date and time flags in the data dictionary.

inherited

CLEAN_INT

CLEAN_INT 

Indicates that the incoming parameter is expected to be an integer.

inherited

This is used when cleaning input parameters for a module action or module call.

CLEAN_FLOAT

CLEAN_FLOAT 

Indicates that the incoming parameter is expected to be a float This is used when cleaning input parameters for a module action or module call.

inherited

CLEAN_NONE

CLEAN_NONE 

Indicates that the incoming parameter is not to be cleaned.

inherited

This is used when cleaning input parameters for a module action or module call.

CLEAN_STRING

CLEAN_STRING 

Indicates that the incoming parameter is a string.

inherited

This is used when cleaning input parameters for a module action or module call.

CLEAN_REGEXP

CLEAN_REGEXP 

Indicates that the incoming parameter is a regular expression.

inherited

This is used when cleaning input parameters for a module action or module call.

CLEAN_FILE

CLEAN_FILE 

Indicates that the incoming parameter is an uploaded file.

inherited

This is used when cleaning input parameters for a module action or module call.

TMP_CACHE_LOCATION

TMP_CACHE_LOCATION 

A constant to indicate the location where private cachable files can be written.

inherited

PUBLIC_CACHE_LOCATION

PUBLIC_CACHE_LOCATION 

A constant to indicate where public (browsable) cachable files can be written.

inherited

PUBLIC_CACHE_URL

PUBLIC_CACHE_URL 

A constant to indicate the public address for cachable files.

inherited

TMP_TEMPLATES_C_LOCATION

TMP_TEMPLATES_C_LOCATION 

A constant containing the smarty template compile directory.

inherited

CMS_DEBUG

CMS_DEBUG 

A constant indicating if CMSMS is in debug mode.

inherited

CMS_ROOT_PATH

CMS_ROOT_PATH 

A constant containing the directory where CMSMS is installed.

inherited

CMS_ASSETS_PATH

CMS_ASSETS_PATH 

A constant containing the directory where CMSMS third party assets are stored.

inherited

CMS_ROOT_URL

CMS_ROOT_URL 

A constant containing the CMSMS root url.

inherited

If the root_url variable is not specified in the config file, then CMSMS will attempt to calculate one.

CMS_UPLOADS_URL

CMS_UPLOADS_URL 

A constant containing the CMSMS uploads url.

inherited

If the uploads_url is not specified in the config file, then CMSMS will calculate one from the root url.

CMS_ASSETS_URL

CMS_ASSETS_URL 

A constant containing the CMSMS assets url.

inherited

If the assets_url is not specified in the config file, then CMSMS will calculate one from the root url and the assets_dir setting.

CMS_DB_PREFIX

CMS_DB_PREFIX 

CMS_DB_PREFIX

inherited

Classes, interfaces and traits

CmsRegularTask

CmsRegularTask 

An interface to define how tasks should work.

inherited

CmsPermission

CmsPermission 

Simple class for dealing with a permission.

inherited final

UserTagOperations

UserTagOperations 

A compatibility class to manage simple plugins.

inherited deprecated final

Formerly 'UserDefinedTags' were stored in the database. In CMSMS 2.3+ this functionality was replaced with simple plugins. This class provides backwards compatibility. This class will be removed from CMSMS at some point in the future.

« More »

cms_content_tree

cms_content_tree 

A tree class that allows backward compatibility (somewhat) to the old Tree class used in CMSMS versions prior to 1.9, and provides content retrieval abilities.

inherited

CmsLayoutTemplateCategory

CmsLayoutTemplateCategory 

A class representing a template category.

inherited

Templates can be optionally organized into categories, this class manages the category itself.

« More »

CmsDbQueryBase

CmsDbQueryBase 

An abstract class for building queries and managing results.

inherited abstract

This class is capable of managing a resultset, and encapsulates conversionof database rows into application objects.

« More »

ContentBase

ContentBase 

Base level content object.

inherited abstract

This is the base level content class. It is an abstract object and cannot be instantiated directly. All content pages in the database are required to be drived from this class.

« More »

cms_cache_handler

cms_cache_handler 

This singleton class provides a convenient caching capbility.

inherited deprecated

By default this uses the cms_filecache_driver to cache data in the TMP_CACHE_LOCATION for one hour.

« More »

CmsLayoutStylesheetQuery

CmsLayoutStylesheetQuery 

A class to represent a template query, and its results.

inherited

This class accepts in it's constructor an array of filter arguments.

« More »

UserOperations

UserOperations 

Class for doing user related functions. Maybe of the User object functions are just wrappers around these.

inherited

CmsNls

CmsNls 

A class to provide data and methods for encapsulating a single language

inherited

CmsAdminUtils

CmsAdminUtils 

A set of static utilities for assisting with admin requests

inherited final

ModuleOperations

ModuleOperations 

A singleton utility class to allow for working with modules.

inherited final

CmsAdminMenuItem

CmsAdminMenuItem 

A class to represent menu items for building an admin navigation.

inherited final

This class is used to build admin navigations.

« More »

cms_admin_utils

cms_admin_utils 

A Simple static class providing various convenience utilities for admin requests.

inherited final

CmsLockOperations

CmsLockOperations 

A singleton class providing utilities for interacting with locks.

inherited final

CmsNlsOperations

CmsNlsOperations 

A singleton class to provide simple, generic mechanism for dealing with languages encodings, and locales. This class does not handle translation strings.

inherited final

CmsCoreCapabilities

CmsCoreCapabilities 

A class that identifies numerous standard core capabilities

inherited final

Group

Group 

Generic group class. This can be used for any logged in group or group related function.

inherited

cms_url

cms_url 

A class for interacting with a URL.

inherited

CmsRoute

CmsRoute 

Simple global convenience object to hold information for a single route.

inherited

CmsLayoutTemplateType

CmsLayoutTemplateType 

A class to manage template types

inherited

User

User 

Generic admin user class. This can be used for any logged in user or user related function.

inherited

BookmarkOperations

BookmarkOperations 

Class for doing bookmark related functions. Maybe of the Bookmark object functions are just wrappers around these.

inherited

cms_utils

cms_utils 

A Simple Static class providing various convenience utilities.

inherited final

CMSModuleContentType

CMSModuleContentType 

Class that module defined content types must extend.

inherited abstract

This is the base level content class. It is an abstract object and cannot be instantiated directly. All content pages in the database are required to be drived from this class.

« More »

cms_tree_operations

cms_tree_operations 

A utility class to provide functions to populate a tree

inherited

CmsLayoutTemplateQuery

CmsLayoutTemplateQuery 

A class to represent a template query, and its results.

inherited

This class accepts in it's constructor an array (or a comma separated string, of filter arguments). Accepted filter arguments are:
o:string - The originator name
i:##,##,## - A list of template id's
t:## - A template type id
c:## - A template category id.
d:## - A design id
u:## - A template owner id
e:## - An additional editor id.
l:# - A boolean (0 or 1) indicating listable, or not listable.

Example:
$qry = new CmsTemplateQuery(array('o:'.get_userid(false)));
$qry->limit = 50;
$list = $qry->GetMatches();

« More »

CmsFormUtils

CmsFormUtils 

A static class providing functionality for building forms.

inherited final

This class will undergo changes in the future, and may no longer operate as a static class goinf forward.

« More »

CmsLayoutCollection

CmsLayoutCollection 

A class to manage a collection (or theme) of Templates and Stylesheets

inherited

cms_http_request

cms_http_request 

HTTP Class

inherited

This is a wrapper HTTP class that uses either cURL or fsockopen to harvest resources from web. This can be used with scripts that need a way to communicate with various APIs who support REST.

Modified by Robert Campbell (calguy1000@cmsmadesimple.org) Renamed the class to cms_http_request Fixed some bugs.

« More »

cms_mailer

cms_mailer 

A class for sending email.

inherited

Prior to CMSMS 2.0 this class was implemented as a core module.

This class should not be instantiated directly.

« More »

cms_siteprefs

cms_siteprefs 

A singleton class for working with site preferences

inherited final

CmsLockException

CmsLockException 

An exception indicating an error creating a lock

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsLockOwnerException

CmsLockOwnerException 

An exception indicating a uid mismatch wrt a lock (person operating on the lock is not the owner)

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsUnLockException

CmsUnLockException 

An exception indicating an error removing a lock

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsNoLockException

CmsNoLockException 

An exception indicating an error loading or finding a lock

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsLock

CmsLock 

A simple class represeinting a lock on a logical object in CMSMS.

inherited final

CmsExtraDataException

CmsExtraDataException 

A basic exception class that holds on to extended information.

inherited abstract

CmsException

CmsException 

A base CMSMS Exception

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsLogicException

CmsLogicException 

A base CMSMS Logic Exception

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsCommunicationException

CmsCommunicationException 

A base CMSMS Communications Exception

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsPrivacyException

CmsPrivacyException 

A base CMSMS Privacy Exception

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsSingletonException

CmsSingletonException 

A base CMSMS Singleton Exception

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsInvalidDataException

CmsInvalidDataException 

An exception indicating invalid data was supplied to a function or class.

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsDataNotFoundException

CmsDataNotFoundException 

An exception indicating that the requested data could not be found.

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsError400Exception

CmsError400Exception 

A special exception indicating that a 400 error should be supplied.

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsError404Exception

CmsError404Exception 

A special exception indicating that a 404 error should be supplied.

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsError403Exception

CmsError403Exception 

A special exception indicating that a 403 error should be supplied.

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsError503Exception

CmsError503Exception 

A special exception indicating that the install is temporarily unavailable (down for maintenance)

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsStopProcessingContentException

CmsStopProcessingContentException 

a special exception indicating that content processing should stop, but other than that it is not there is no error to display.

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsContentException

CmsContentException 

A special exception indicating an error with a content object

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsEditContentException

CmsEditContentException 

A special exception indicating an error when editing content.

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsSQLErrorException

CmsSQLErrorException 

A special exception indicating an SQL Error.

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsXMLErrorException

CmsXMLErrorException 

A special exception indicating an XML Error.

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsFileSystemException

CmsFileSystemException 

A special exception indicating a problem with a file, directory, or filesystem

inherited

This exception can accept an integer 'code' for an exception or a language key. if the string passed in contains a space it is not translated.

« More »

CmsApp

CmsApp 

Simple singleton class that contains various functions and states representing the application.

inherited final

Note: This class was named CmsObject before version 1.10

« More »

CmsContentTypePlaceholder

CmsContentTypePlaceholder 

Simple global convenience object to hold CMS Content Type structure.

inherited

This class is subject to a refactoring at some point.

« More »

cms_filecache_driver

cms_filecache_driver 

A cache driver to cache files using the filesystem.

inherited

This driver stores files in the CMSMS TMP_CACHE location. Supports read, and write locking a settable cache lifetime, md5 encoded keys and groups so that filenames cannot be easily determined, and automatic cleaning.

« More »

CmsLayoutTemplate

CmsLayoutTemplate 

A class to represent a smarty template.

inherited

cms_cache_driver

cms_cache_driver 

An abstract class for various cache drivers

inherited abstract

Events

Events 

Class for handling and dispatching system and user defined events.

inherited deprecated final

CmsAdminThemeBase

CmsAdminThemeBase 

Base class for CMSMS Admin themes.

inherited abstract

This is an abstract class that is used for building CMSMS Admin Themes. This is also a singleton object.

« More »

CmsAdminThemeNotification

CmsAdminThemeNotification 

A class representing a simple notification.

inherited

cms_cookies

cms_cookies 

A simple static class providing convenience utilities for working with cookies.

inherited deprecated final

CmsLangOperations

CmsLangOperations 

A singleton class to provide simple, generic mechanism for dealing with languages encodings, and locales. This class does not handle translation strings.

inherited final

CmsLayoutStylesheet

CmsLayoutStylesheet 

A class to represent a stylesheet.

inherited

This class is capable of managing a single stylesheet, and has static methods for loading stylesheets from the database. Loaded stylesheets are cached in internal memory to ensure that the same stylesheet is not loaded twice for a request.

Stylesheets are (optionally) attached to designs (CmsLayoutCollection) see the {cms_stylesheet} plugin for more information.

« More »

cms_userprefs

cms_userprefs 

A static class for preferences stored with admin user preferences.

inherited final

ContentOperations

ContentOperations 

Class for static methods related to content

inherited

CMSModule

CMSModule 

Base module class.

inherited abstract

All modules should inherit and extend this class with their functionality.

« More »

cms_route_manager

cms_route_manager 

A singleton class to manage all recognized routes in the system.

inherited deprecated final

This class is used internally to allow managing routes. It should not be used by the public.

« More »

cms_tree

cms_tree 

A Simple PHP Tree class that allows storing associative data along with each node.

inherited

cms_admin_tabs

cms_admin_tabs 

A simple convenience class for creating a tabbed interface in the CMSMS admin console

inherited final

GroupOperations

GroupOperations 

A singleton Class for doing group related functions.

inherited final

Many of the Group object functions are just wrappers around these.

« More »

ExternalHandlerJob

ExternalHandlerJob 

A type of job that calls an external function for processing. i.e: a UDT or a static function.

inherited

If a module is specified for this object, then the module will be loaded before calling the handler.

« More »

CmsLanguageDetector

CmsLanguageDetector 

An abstract class that is used to determine a suitable language for display This may be used by CMSMS on frontend requests to detect a suitable language.

inherited abstract

modules may supply a language detector to read from preferences etc.

« More »

cms_config

cms_config 

A singleton class for interacting with the CMSMS config.php file.

inherited final

This class usses the ArrayAccess interface to behave like a PHP array.

« More »

Bookmark

Bookmark 

Bookmark class for the CMSMS admin console.

inherited

Classes, interfaces and traits

IAuditManager

IAuditManager 

An abstract interface for classes that provide auditing.

inherited

FilePickerInterface

FilePickerInterface 

Define an interface for modules that provide filepicker functionality.

inherited

ICookieManager

ICookieManager 

An interface to describe a CMSMS cookie manager.

inherited

HttpErrorLogAuditor

HttpErrorLogAuditor 

A basic error log auditor that uses PHP's error log to output formatted messages.

inherited

AuditManager

AuditManager 

A manager contains links to the standard auditor and an optional audit handler.

inherited final

so that CMSMS can output it's messages somewhere.

« More »

FilePickerProfile

FilePickerProfile 

A simple class that defines a profile of information used by the filepicker to indicate how it should behave and what functionality should be provided.

inherited

This is an immutable class.

The constructor and overrideWith methods of this class accept an associative array of parameters (see the properties below) to allow building or altering a profile object. Ths is the only time when properties of a profile can be adjusted.


$obj = new \CMSMS\FilePickerProfile( [ 'type'=>FileType::TYPE_IMAGE,
   'exclude_prefix'=>'foo' ] );
« More »

FileType

FileType 

A simple abstract class that defines constants for numerous file types.

inherited abstract

AutoCookieManager

AutoCookieManager 

This class adjusts the way cookies are stored to allow identifying their primitive type (string, object, array). And then when retrieved can automatically restore them.

inherited

This class uses json to encoe arrays and objects, for security. Objects should implement the JsonSerializable interface if they can be saved to a cookie.

« More »

frontend_theme_placeholder

frontend_theme_placeholder 

A class that acts as a placeholder for a frontend theme.

inherited

the frontend theme is used by the cms_theme resource to display content

« More »

HookManager

HookManager 

A class to manage hooks, and to call hook handlers.

inherited

This class is capable of managing a flexible list of hooks, registering handlers for those hooks, and calling the handlers

« More »

simple_plugin_operations

simple_plugin_operations 

This operations class handles reading and writing simple plugins.

inherited final

this is a singleton class.

« More »

ScriptManager

ScriptManager 

The ScriptManager class provides the ability to queue javascript files for rendering on the frontend

inherited

apc_cache_driver

apc_cache_driver 

This is a cache driver for CMSMS that stores cached data in memory using the APC library

inherited

This class will obfuscate all keys, and groups for added security.

« More »

hook_manager

hook_manager 

A class to add hook handlers and emit hooks of various types.

inherited

This class is capable of managing a flexible list of hooks, registering handlers for those hooks, and calling the handlers

« More »

FileTypeHelper

FileTypeHelper 

A class to provide utilities for manipulating files by their type.

inherited

StylesheetManager

StylesheetManager 

This class is the backend behind the {cms_queue_css} and {cms_render_css} plugins.

inherited

It handles queueing CSS files, and then concatenating them all on output, and generating the appropriate HTML meta tag.

« More »

LayoutTemplateManager

LayoutTemplateManager 

A class that manages the storage of CmsLayoutTemplate objects in the database.

inherited

This class also supports caching, and sending hooks at various levels

« More »

SignedCookieManager

SignedCookieManager 

This cookie manager obfuscates all keys and signs via SHA1 the values On get, if the attached signature does not match the generated signature, no value is returned.

inherited

Classes, interfaces and traits

TemplateTypeAssistant

TemplateTypeAssistant 

An abstract class to define an assistant to the template type objects in the database.

inherited abstract

Classes, interfaces and traits

SimpleAlert

SimpleAlert 

The SimpleAlert class is a type of alert that allows the developer to create alerts with pre-defined titles, messages, icons, and permissions.

inherited

Admin alerts have a name, priority, title, message, a timestamp and can optionally refer to a module. Methods are used to test if a module is for a specific user, and to format the message.

Alerts are stored as preferences in the database. If the name is the name of the class or something else that is not data or time dependant the only one instance of that alert can be stored in the database. This class usses the ArrayAccess interface to behave like a PHP array.

« More »

TranslatableAlert

TranslatableAlert 

The TranslatableAlert object is an alert that supports translatable language keys.

inherited

This class will use the module that is associated with the alert to translate the key. If the module name is empty, or the special value 'core' then the global 'lang' function will be used to read translations from the admin lang file.

« More »

Alert

Alert 

An abstract class that defines Admin Alerts for CMSMS.

inherited abstract

Admin alerts have a name, priority, title, message, a timestamp and can optionally refer to a module. Methods are used to test if a module is for a specific user, and to format the message.

Alerts are stored as preferences in the database. If the name is the name of the class or something else that is not data or time dependant the only one instance of that alert can be stored in the database. This class usses the ArrayAccess interface to behave like a PHP array.

« More »

Classes, interfaces and traits

Error

Error 

#ignore

inherited

compatibility

compatibility 

A class for providing some compatibility functionality with older module code

inherited final

DataDictionary

DataDictionary 

A class defining methods to work directly with database tables.

inherited abstract

This file is based on the DataDictionary base class from the adodb_lite library which was in turn a fork of the adodb library at approximately 2004.

Credits and kudos to the authors of those packages.

« More »

Connection

Connection 

A class defining a database connection, and mechanisms for working with a database.

inherited abstract

This library is largely compatible with adodb_lite with the pear,extended,transaction plugins with a few notable differences:

Differences:

  • GenID will not automatically create a sequence table.

    We encourage you to not use sequence tables and use auto-increment fields instead.

« More »

DatabaseException

DatabaseException 

A special type of exception related to database queries.

inherited

DatabaseConnectionException

DatabaseConnectionException 

A special exception indicating a problem connecting to the database.

inherited

Resultset

Resultset 

A class defining a resultset and how to interact with results from a database query.

inherited abstract

Statement

Statement 

A class defining a prepared database statement.

inherited abstract

ConnectionSpec

ConnectionSpec 

A class defining all of the details needed to connect to a database.

inherited

Some database drivers may not require all of the parameters.

« More »

ConnectionSpecException

ConnectionSpecException 

A special exception to indicate a problem with a ConnectionSpec

inherited

EmptyRecordset

EmptyRecordset 

A final class to describe a special (empty) recordset.

inherited final

Classes, interfaces and traits

CronJobTrait

CronJobTrait 

A Trait to define functionality for recurring cron jobs.

inherited

CronJobInterface

CronJobInterface 

A simple interface to define the functions and constants needed for a cron job.

inherited

CronJob

CronJob 

An abstract base class for a cronjob.

inherited abstract

A Cron job is different than a regular job in that it recurs at a specified frequency and can have an end/until date.

« More »

RegularTask

RegularTask 

This class allows converting an old CmsRegularTask pseudocron task into an asynchronous background job.

inherited

Job

Job 

A class defining an asynchronous job, and mechanisms for saving and retrieving that job.

inherited abstract

JobManager

JobManager 

A singleton class defining a manager for asyncrhonous jobs.

inherited final

In reality, this is a simple proxy for methods in the CmsJobManager module.

« More »