Functions

cms_set_frontend_language

cms_set_frontend_language(string $lang = '') 

Temporarily override the current frontend language.

inherited deprecated

Arguments

string $lang

The language to set. If empty, the system will be restored to the default frontend language.

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

get_encoding

get_encoding : string

Get the encoding of the current language.

inherited deprecated

Response

string

get_language_list

get_language_list(boolean $allow_none = true) : \associative

Retrieve a list of installed languages that is suitable for use in a dropdown.

inherited

Arguments

boolean $allow_none

Optionally adds 'none' (translated to current language) to the top of the list.

Response

\associative

array of lang keys and display strings.

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

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_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, 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

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, 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

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) 

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

cms_get_jquery

cms_get_jquery(string $exclude = '', boolean $ssl = null, boolean $cdn = false, string $append = '', string $custom_root = '', boolean $include_css = TRUE) 

A function to return the appropriate HTML tags to include the CMSMS included jquery in a web page.

inherited

CMSMS is distributed with a recent version of jQuery, jQueryUI and various other jquery based libraries. This function generates the HTML code that will include these scripts.

See the {cms_jquery} smarty plugin for a convenient way of including the CMSMS provided jquery libraries from within a smarty template.

Known libraries: jquery jquery-ui nestedSortable json migrate

Arguments

string $exclude

A comma separated list of script names or aliases to exclude.

boolean $ssl

Force use of the ssl_url for the root url to necessary scripts.

boolean $cdn

Force the use of a CDN url for the libraries if one is known

string $append

A comma separated list of library URLS to the output

string $custom_root

A custom root URL for all scripts (when using local mode). If this is spefied the $ssl param will be ignored.

boolean $include_css

Optionally output stylesheet tags for the included javascript libraries.

get_userid

get_userid(boolean $redirect = true) : integer

Gets the userid of the currently logged in 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 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

Arguments

string $no_redirect

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

Response

boolean

check_permission

check_permission(integer $userid, 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

audit

audit(integer $itemid, string $itemname, string $action) : void

Put an event into the audit (admin) log. This should be done on most admin events for consistency.

inherited

Arguments

integer $itemid

The item id (perhaps a content id, or a record id from a module)

string $itemname

The item name (perhaps Content, or the module name)

string $action

The action that needs to be audited

get_site_preference

get_site_preference(string $prefname, mixed $defaultvalue = '') : 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

remove_site_preference

remove_site_preference(string $prefname, boolean $uselike = false) : void

Removes the given site preference

inherited deprecated

Arguments

string $prefname

Preference name to remove

boolean $uselike

Wether or not to remove all preferences that are LIKE the supplied name

set_site_preference

set_site_preference(string $prefname, mixed $value) : void

Sets the given site perference with the given value.

inherited deprecated

Arguments

string $prefname

The preference name

mixed $value

The preference value (will be stored as a string)

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

ADONewConnection

ADONewConnection(string $dbms, string $flags) : \CMSMS\Database\Connection

A function co create a new adodb database connection.

inherited deprecated

Arguments

string $dbms

string $flags

Response

\CMSMS\Database\Connection

load_adodb

load_adodb 

A function to load the adodb library.

inherited deprecated

This method currently has no functionality.

adodb_connect

adodb_connect 

An old method to ensure that we are re-connected to the proper database

inherited deprecated

adodb_error

adodb_error(string $dbtype, string $function_performed, integer $error_number, string $error_message, string $host, string $database, mixed &$connection_obj) 

An old function for handling a database error.

inherited deprecated

Arguments

string $dbtype

string $function_performed

integer $error_number

string $error_message

string $host

string $database

mixed $connection_obj

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)

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

Constants

__CMS_PREVIEW_PAGE__

__CMS_PREVIEW_PAGE__ 

__CMS_PREVIEW_PAGE__

inherited

CMS_ADODB_DT

CMS_ADODB_DT 

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

inherited

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_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_DB_PREFIX

CMS_DB_PREFIX 

CMS_DB_PREFIX

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.

Classes, interfaces and traits

CmsRegularTask

CmsRegularTask 

An interface to define how tasks should work.

inherited

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_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, with interface into the content cache.

inherited

CmsFormUtils

CmsFormUtils 

A static class providing functionality for building forms.

inherited final

User

User 

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

inherited

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

CmsLayoutTemplateType

CmsLayoutTemplateType 

A class to manage template types

inherited

CmsNls

CmsNls 

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

inherited

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 »

Group

Group 

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

inherited

CmsAdminUtils

CmsAdminUtils 

A set of static utilities for assisting with admin requests

inherited final

cms_url

cms_url 

A class for interacting with a URL.

inherited

ContentOperations

ContentOperations 

Class for static methods related to content

inherited

ContentManager

ContentManager 

A simple alias for the ContentOperations class

inherited

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 »

Events

Events 

Class for handling and dispatching system and user defined events.

inherited final

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_tree

cms_tree 

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

inherited

CmsRoute

CmsRoute 

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

inherited

cms_mailer

cms_mailer 

A class for sending email.

inherited

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

« More »

GroupOperations

GroupOperations 

A singleton Class for doing group related functions.

inherited final

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

« More »

UserOperations

UserOperations 

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

inherited

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

CmsLayoutTemplate

CmsLayoutTemplate 

A class to represent a smarty template.

inherited

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_siteprefs

cms_siteprefs 

A class for working with site preferences

inherited 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

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 »

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 »

CmsAdminMenuItem

CmsAdminMenuItem 

Base module class.

inherited final

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

« More »

cms_utils

cms_utils 

A Simple Static class providing various convenience utilities.

inherited final

cms_module_smarty_plugin_manager

cms_module_smarty_plugin_manager 

A singleton class to manage static smarty plugins registered by modules.

inherited final

cms_userprefs

cms_userprefs 

A static class for preferences stored with admin user accounts

inherited final

CmsLayoutTemplateCategory

CmsLayoutTemplateCategory 

A class representing a template category.

inherited

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

« More »

cms_cookies

cms_cookies 

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

inherited final

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 »

CmsLockOperations

CmsLockOperations 

A singleton class providing utilities for interacting with locks.

inherited final

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

UserTagOperations

UserTagOperations 

UserTags class for admin

inherited final

cms_admin_utils

cms_admin_utils 

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

inherited final

cms_cache_driver

cms_cache_driver 

An abstract class for various cache drivers

inherited abstract

cms_tree_operations

cms_tree_operations 

A utility class to provide functions to populate a tree

inherited

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 »

cms_cache_handler

cms_cache_handler 

This singleton class provides a convenient caching capbility.

inherited

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

« More »

CmsPermission

CmsPermission 

Simple class for dealing with a permission.

inherited final

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 »

CMSModule

CMSModule 

Base module class.

inherited abstract

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

« More »

CmsCoreCapabilities

CmsCoreCapabilities 

A class that identifies numerous standard core capabilities

inherited final

BookmarkOperations

BookmarkOperations 

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

inherited

CmsLayoutCollection

CmsLayoutCollection 

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

inherited

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

cms_route_manager

cms_route_manager 

A class to manage all recognized routes in the system.

inherited final

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 »

cms_admin_tabs

cms_admin_tabs 

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

inherited final

ModuleOperations

ModuleOperations 

A singleton utility class to allow for working with modules.

inherited final

Bookmark

Bookmark 

Bookmark class for the CMSMS admin console.

inherited

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 »

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 »

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 »

Classes, interfaces and traits

FilePickerInterface

FilePickerInterface 

Define an interface for modules that provide filepicker functionality.

inherited

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 »

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 and/or related events.

« More »

FileType

FileType 

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

inherited abstract

FileTypeHelper

FileTypeHelper 

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

inherited

Classes, interfaces and traits

HookHandler

HookHandler 

An internal class to represent a hook handler.

inherited

HookDefn

HookDefn 

An internal class to represent a hook.

inherited

Classes, interfaces and traits

Statement

Statement 

A class defining a prepared database statement.

inherited abstract

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 »

compatibility

compatibility 

A class for providing some compatibility functionality with older module code

inherited final

Resultset

Resultset 

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

inherited abstract

EmptyResultset

EmptyResultset 

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

inherited final

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

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

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

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 »

RegularTask

RegularTask 

This class allows converting an old CmsRegularTask pseudocron task into an asynchronous background 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 »

Job

Job 

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

inherited abstract

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

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 »

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 »