audit(integer|null $item_id, string $subject, string $message)
integer|null $item_idstring $subjectstring $messagecms_notice(string $msg, string $subject = null)
string $msgstring $subjectcms_warning(string $msg, string $subject = null)
string $msgstring $subjectcms_error(string $msg, string $subject = null)
string $msgstring $subjectNewDataDictionary(\CMSMS\Database\Connection $conn) : \CMSMS\Database\DataDictionary
cms_db_prefix : string
string
get_preference(integer $userid, string $prefname, mixed $default = '') : mixed
integer $useridThe user id
string $prefnameThe preference name
mixed $defaultThe default value if the preference is not set for the given user id.
mixed
set_preference(integer $userid, string $prefname, mixed $value)
integer $useridThe user id
string $prefnameThe preference name
mixed $valueThe preference value (will be stored as a string)
get_userid(boolean $redirect = true) : integer
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.
boolean $redirectRedirect to the admin login page if the user is not logged in.
integer
The UID of the logged in administrator, otherwise FALSE
get_username(boolean $check = true) : string
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.
boolean $checkRedirect to the admin login page if the user is not logged in.
string
the username of the logged in user.
check_login(string $no_redirect = false) : boolean
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.
string $no_redirectIf true, then don't redirect if not logged in
boolean
check_permission(integer $userid = null, string $permname) : boolean
Members of the admin group have all permissions.
integer $useridThe user id
string $permnameThe permission name
boolean
get_site_preference(string $prefname, mixed $defaultvalue = null) : mixed
string $prefnameThe preference name
mixed $defaultvalueThe default value if the preference does not exist
mixed
is_sitedown : boolean
This method includes handling the preference that indicates that site-down behaviour should be disabled for certain IP address ranges.
boolean
lang_by_realm(string $realm, string $key) : string
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');
string $realmThe realm
string $keyThe lang key and any vspring arguments.
string
lang(string $key) : string
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');
string $keyThe key to translate and then any vsprintf arguments for the key.
string
redirect(string $to)
If headers have not been sent this method will use header based redirection. Otherwise javascript redirection will be used.
string $toThe url to redirect to
redirect_to_alias(mixed $alias)
Retrieves the URL of the specified page, and performs a redirect
mixed $aliasAn integer page id or a string page alias.
microtime_diff(string $a, string $b) : integer
string $aEarlier microtime value
string $bLater microtime value
integer
The difference.
cms_join_path : string
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);
string
cms_is_uri(string $in = null) : boolean
string $inThe string to test
boolean
cms_fix_path(string $in) : string
string $in string
cms_relative_path(string $in, string $relative_to = null) : string
string $inThe input path or file specification
string $relative_toThe optional path to compute relative to. If not supplied the cmsms root path will be used.
string
The relative portion of the input string.
cms_htmlentities(string $val = null, string $param = ENT_QUOTES, string $charset = "UTF-8", boolean $convert_single_quotes = false) : string
string $valThe input string
string $paramA flag indicating how quotes should be handled (see htmlentities) (ignored)
string $charset$val The input character set (ignored)
boolean $convert_single_quotesA flag indicating wether single quotes should be converted to entities.
string
the converted string.
debug_bt_to_log
debug_bt
This function does not return but echoes output.
debug_display(mixed $var, string $title = "", boolean $echo_to_screen = true, boolean $use_html = true, boolean $showtitle = TRUE) : string
mixed $varThe 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.
string
debug_output(mixed $var, string $title = "")
mixed $varstring $titledebug_to_log(mixed $var, string $title = '', string $filename = '')
mixed $vardata to display
string $titleoptional title.
string $filenameoptional output filename
debug_buffer(mixed $var, string $title = "")
mixed $varstring $titleget_parameter_value(array $parameters, string $value, mixed $default_value = '', string $session_key = '') : mixed
Returns $default if $value is not in $params array. Note: This function will also trim() string values.
array $parametersstring $valuemixed $default_valuestring $session_key mixed
is_directory_writable(string $path) : boolean
string $pathStart directory.
boolean
get_recursive_file_list(string $path, array $excludes, integer $maxdepth = -1, string $mode = "FULL", \d $d) : array<mixed,string>
string $pathStart Path.
array $excludesArray of regular expressions indicating files to exclude.
integer $maxdepthHow deep to browse (-1=unlimited)
string $mode"FULL"|"DIRS"|"FILES"
\d $dfor internal use only
array<mixed,string>
recursive_delete(string $dirname) : boolean
string $dirnameThe directory name
boolean
chmod_r(string $path, integer $mode)
string $pathThe start location
integer $modeThe octal mode Rolf: only used in admin/listmodules.php
startswith(string $str, string $sub) : boolean
i.e: startswith('The Quick Brown Fox','The');
string $strThe string to test against
string $subThe search string
boolean
endswith(string $str, string $sub) : boolean
i.e: endswith('The Quick Brown Fox','Fox');
string $strThe string to test against
string $subThe search string
boolean
munge_string_to_url(string $alias, boolean $tolower = false, boolean $withslash = false) : string
string $aliasString to convert
boolean $tolowerIndicates whether output string should be converted to lower case
boolean $withslashIndicates wether slashes should be allowed in the input.
string
cleanString(string $in) : string
string $in string
ini_get_boolean(string $str) : integer
string $strThe php ini key
integer
stack_trace
This method uses echo.
cms_move_uploaded_file(string $tmpfile, string $destination) : \bool.
string $tmpfileThe temporary file specification
string $destinationThe destination file specification
\bool.
cms_ipmatches(string $ip, string|array $checklist) : boolean
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)
string $ipIP address to test
string|array $checklistArray of match expressions
boolean
Rolf: only used in lib/content.functions.php
is_email(string $email, boolean $checkDNS = false) : boolean
string $emailboolean $checkDNS boolean
cms_to_bool(string $str = null)
accepts, 'y','yes','true',1 as TRUE (case insensitive) all other values represent FALSE.
string $strInput string to test. Rolf: only used in lib/classes/contenttypes/Content.inc.php
is_base64(string $s) : boolean
string $sThe input string
boolean
cms_create_guid : string
string
CMS_ADODB_DT
CLEAN_INT
This is used when cleaning input parameters for a module action or module call.
CLEAN_FLOAT
CLEAN_NONE
This is used when cleaning input parameters for a module action or module call.
CLEAN_STRING
This is used when cleaning input parameters for a module action or module call.
CLEAN_REGEXP
This is used when cleaning input parameters for a module action or module call.
CLEAN_FILE
This is used when cleaning input parameters for a module action or module call.
TMP_CACHE_LOCATION
PUBLIC_CACHE_LOCATION
PUBLIC_CACHE_URL
TMP_TEMPLATES_C_LOCATION
CMS_DEBUG
CMS_ROOT_PATH
CMS_ASSETS_PATH
CMS_ROOT_URL
If the root_url variable is not specified in the config file, then CMSMS will attempt to calculate one.
CMS_UPLOADS_URL
If the uploads_url is not specified in the config file, then CMSMS will calculate one from the root url.
CMS_ASSETS_URL
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
UserTagOperations
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.
cms_content_tree
CmsLayoutTemplateCategory
Templates can be optionally organized into categories, this class manages the category itself.
CmsDbQueryBase
This class is capable of managing a resultset, and encapsulates conversionof database rows into application objects.
ContentBase
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.
cms_cache_handler
By default this uses the cms_filecache_driver to cache data in the TMP_CACHE_LOCATION for one hour.
CmsLayoutStylesheetQuery
This class accepts in it's constructor an array of filter arguments.
UserOperations
CmsAdminUtils
ModuleOperations
CmsAdminMenuItem
This class is used to build admin navigations.
cms_admin_utils
CmsLockOperations
CmsNlsOperations
CmsCoreCapabilities
Group
CmsRoute
User
BookmarkOperations
CMSModuleContentType
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.
cms_tree_operations
CmsLayoutTemplateQuery
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();
CmsFormUtils
This class will undergo changes in the future, and may no longer operate as a static class goinf forward.
CmsLayoutCollection
cms_http_request
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.
cms_mailer
Prior to CMSMS 2.0 this class was implemented as a core module.
This class should not be instantiated directly.
CmsLockException
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.
CmsLockOwnerException
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.
CmsUnLockException
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.
CmsNoLockException
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.
CmsExtraDataException
CmsException
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.
CmsLogicException
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.
CmsCommunicationException
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.
CmsPrivacyException
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.
CmsSingletonException
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.
CmsInvalidDataException
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.
CmsDataNotFoundException
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.
CmsError400Exception
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.
CmsError404Exception
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.
CmsError403Exception
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.
CmsError503Exception
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.
CmsStopProcessingContentException
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.
CmsContentException
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.
CmsEditContentException
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.
CmsSQLErrorException
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.
CmsXMLErrorException
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.
CmsFileSystemException
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.
CmsApp
Note: This class was named CmsObject before version 1.10
CmsContentTypePlaceholder
This class is subject to a refactoring at some point.
cms_filecache_driver
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.
Events
CmsAdminThemeBase
This is an abstract class that is used for building CMSMS Admin Themes. This is also a singleton object.
CmsAdminThemeNotification
CmsLangOperations
CmsLayoutStylesheet
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.
cms_userprefs
CMSModule
All modules should inherit and extend this class with their functionality.
cms_route_manager
This class is used internally to allow managing routes. It should not be used by the public.
cms_tree
cms_admin_tabs
GroupOperations
Many of the Group object functions are just wrappers around these.
ExternalHandlerJob
If a module is specified for this object, then the module will be loaded before calling the handler.
CmsLanguageDetector
modules may supply a language detector to read from preferences etc.
FilePickerInterface
HttpErrorLogAuditor
AuditManager
so that CMSMS can output it's messages somewhere.
FilePickerProfile
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' ] );
FileType
AutoCookieManager
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.
frontend_theme_placeholder
the frontend theme is used by the cms_theme resource to display content
HookManager
This class is capable of managing a flexible list of hooks, registering handlers for those hooks, and calling the handlers
simple_plugin_operations
this is a singleton class.
ScriptManager
apc_cache_driver
This class will obfuscate all keys, and groups for added security.
hook_manager
This class is capable of managing a flexible list of hooks, registering handlers for those hooks, and calling the handlers
FileTypeHelper
StylesheetManager
It handles queueing CSS files, and then concatenating them all on output, and generating the appropriate HTML meta tag.
SimpleAlert
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.
TranslatableAlert
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.
Alert
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.
compatibility
DataDictionary
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.
Connection
This library is largely compatible with adodb_lite with the pear,extended,transaction plugins with a few notable differences:
Differences:
We encourage you to not use sequence tables and use auto-increment fields instead.
DatabaseException
DatabaseConnectionException
Resultset
ConnectionSpec
Some database drivers may not require all of the parameters.
ConnectionSpecException
CronJobTrait
CronJobInterface
CronJob
A Cron job is different than a regular job in that it recurs at a specified frequency and can have an end/until date.
RegularTask
Job