Documentation

Cx
in package

This loads and controls everything

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

Michael Ritter michael.ritter@comvation.com

subpackage

core

link

cloudrexx homepage

since
3.1.0
todo

Remove all instances of "global" or at least move them to a single place

Table of Contents

Constants

EXCEPTION_TEMPLATE_ERROR  = 'Error'
Exception template shown on error; content is customizable
EXCEPTION_TEMPLATE_OFFLINE  = 'Offline'
Exception template shown when offline
FOLDER_NAME_BACKEND  = '/cadmin'
The folder name used to access the backend of the website (/cadmin).
FOLDER_NAME_CACHE  = '/cache'
The folder name used for the cache storage location in temp (/cache).
FOLDER_NAME_COMMAND_MODE  = '/api'
The folder name used to access the command mode of the website (/api).
FOLDER_NAME_CONFIG  = '/config'
The folder name of the storage location of the config files (/config).
FOLDER_NAME_CORE  = '/core'
The folder name of the storage location of the core components (/core).
FOLDER_NAME_CORE_MODULE  = '/core_modules'
The folder name used for the core_modules storage location (/core_modules).
FOLDER_NAME_CUSTOMIZING  = '/customizing'
The folder name used for the customizing storage location (/customizing).
FOLDER_NAME_FEED  = '/feed'
The folder name used for the application feeds (/feed).
FOLDER_NAME_IMAGES  = '/images'
FOLDER_NAME_LIBRARY  = '/lib'
The folder name used for the lib storage location (/lib).
FOLDER_NAME_MEDIA  = '/media'
FOLDER_NAME_MODEL  = '/model'
The folder name used for the model storage location (/model).
FOLDER_NAME_MODULE  = '/modules'
The folder name used for the modules storage location (/modules).
FOLDER_NAME_PUBLIC_TEMP  = '/public'
FOLDER_NAME_TEMP  = '/tmp'
The folder name used for the temp storage location (/tmp).
FOLDER_NAME_THEMES  = '/themes'
The folder name used for the themes (/themes).
MODE_BACKEND  = 'backend'
Backend mode
MODE_COMMAND  = 'command'
Commandline interface mode
MODE_FRONTEND  = 'frontend'
Frontend mode
MODE_MINIMAL  = 'minimal'
Minimal mode
SUB_STAGE_ADJUST_RESPONSE  = 12
SUB_STAGE_COMPONENT_LOAD  = 4
SUB_STAGE_FINALIZE  = 19
SUB_STAGE_INIT  = 2
SUB_STAGE_LOAD  = 15
SUB_STAGE_POST_COMPONENT_LOAD  = 7
SUB_STAGE_POST_CONTENT_LOAD  = 17
SUB_STAGE_POST_CONTENT_PARSE  = 16
SUB_STAGE_POST_FINALIZE  = 20
SUB_STAGE_POST_INIT  = 8
SUB_STAGE_POST_RESOLVE  = 11
SUB_STAGE_PRE_COMPONENT_LOAD  = 3
SUB_STAGE_PRE_CONTENT_LOAD  = 13
SUB_STAGE_PRE_CONTENT_PARSE  = 14
SUB_STAGE_PRE_FINALIZE  = 18
SUB_STAGE_PRE_INIT  = 1
SUB_STAGE_PRE_RESOLVE  = 9
SUB_STAGE_REGISTER_EVENTLISTENERS  = 6
SUB_STAGE_REGISTER_EVENTS  = 5
SUB_STAGE_RESOLVE  = 10

Properties

$allowCustomExceptionTemplate  : bool
Enable customizing the exception template file path
$autoIncrementValueOfId  : mixed
Auto-increment value used for the next Cx object to be instanciated.
$ch  : ComponentHandler
Component handler
$cl  : ClassLoader
Class auto loader
$codeBaseAdminTemplatePath  : string
The absolute path used to access the backend template of the Code Base of the Cloudrexx installation Formerly known as ASCMS_ADMIN_TEMPLATE_PATH
$codeBaseAdminTemplateWebPath  : string
The offset path used to access the backend template of the Code Base of the Cloudrexx installation.
$codeBaseConfigPath  : string
The absolute path to the storage location of the configuration files (/config) of the Code Base of the Cloudrexx installation.
$codeBaseCoreModulePath  : string
The absolute path of the core modules(core_modules) folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_CORE_MODULE_PATH
$codeBaseCoreModuleWebPath  : string
The offset path of the core modules(core_modules) folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_CORE_MODULE_WEB_PATH
$codeBaseCorePath  : string
The absolute path to the core components (/core) of the Code Base of the Cloudrexx installation.
$codeBaseCoreWebPath  : string
The offset path to the core components (/core) of the Code Base of the Cloudrexx installation.
$codeBaseDocumentRootPath  : string
The absolute path to the Code Base of the Cloudrexx installation.
$codeBaseFrameworkPath  : string
The absolute path of the FRAMEWORK folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_FRAMEWORK_PATH
$codeBaseLibraryPath  : string
The absolute path of the lib folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_LIBRARY_PATH
$codeBaseModelPath  : string
The absolute path of the model folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_MODEL_PATH
$codeBaseModulePath  : string
The absolute path of the module folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_MODULE_PATH
$codeBaseModuleWebPath  : string
The offset path of the module folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_MODULE_WEB_PATH
$codeBaseOffsetPath  : string
The offset path from the webserver's DocumentRoot to the location of the Code Base of the Cloudrexx installation.
$codeBasePath  : string
The webserver's DocumentRoot path.
$codeBaseThemesPath  : string
The absolute path to the themes storage location (/themes) of the Code Base of the Cloudrexx installation
$commands  : array<string|int, mixed>
List of available commands in command mode. Key is command name, value is the responsible component.
$config  : SystemConfig
$currentSubStage  : int
$customizingPath  : string
If null, customizing is deactivated
$db  : Db
Database connection handler
$endcode  : string
$eventManager  : EventManager
Cloudrexx event manager
$exceptionTemplateErrorFilePath  : string
Override the error template file path
$exceptionTemplateOfflineFilePath  : string
Override the offline exception template file path
$id  : mixed
Id of the Cx object
$initialized  : bool
$instances  : array<string|int, mixed>
Holds references to all currently loaded Cx instances
$langId  : int
Current language id
$license  : License
License for this instance
$mediaSourceManager  : MediaSourceManager
$memoryLimit  : int
$mode  : string
System mode
$preferredInstance  : Cx
Holds the reference to preferred instance of this class
$preLoadedComponents  : array<string|int, mixed>
$request  : Request
Request URL
$resolvedPage  : Page
If null, page is not resolved yet
$resolver  : Resolver
Resolver used for page resolving (for the moment frontend mode only)
$response  : Response
Response object
$startTime  : float
Microseconds of the time this request was initiated since Unix epoch.
$template  : Sigma
Main template
$toolbox  : FWSystem
Cloudrexx toolbox
$websiteConfigPath  : string
The absolute path to the storage location of the website's config files (/config).
$websiteCustomizingPath  : string
The absolute path to the customizing repository of the website.
$websiteCustomizingWebPath  : string
The offset path from the website's DocumentRoot to the customizing repository of the website.
$websiteDocumentRootPath  : string
The absolute path to the data repository of the Cloudrexx installation.
$websiteFeedPath  : string
The absolute path to the feed storage location (/feed) of the associated Data repository of the website.
$websiteFeedWebPath  : mixed
$websiteImagesAccessPath  : mixed
$websiteImagesAccessPhotoPath  : mixed
$websiteImagesAccessPhotoWebPath  : mixed
$websiteImagesAccessProfilePath  : mixed
$websiteImagesAccessProfileWebPath  : mixed
$websiteImagesAccessWebPath  : mixed
$websiteImagesAttachPath  : mixed
$websiteImagesAttachWebPath  : mixed
$websiteImagesCalendarPath  : mixed
$websiteImagesCalendarWebPath  : mixed
$websiteImagesContentPath  : mixed
$websiteImagesContentWebPath  : mixed
$websiteImagesCrmPath  : mixed
$websiteImagesCrmProfilePath  : mixed
$websiteImagesCrmProfileWebPath  : mixed
$websiteImagesCrmWebPath  : mixed
$websiteImagesDownloadsPath  : mixed
$websiteImagesDownloadsWebPath  : mixed
$websiteImagesGalleryPath  : mixed
$websiteImagesGalleryWebPath  : mixed
$websiteImagesMediaDirPath  : mixed
$websiteImagesMediaDirWebPath  : mixed
$websiteImagesPath  : mixed
$websiteImagesShopPath  : mixed
$websiteImagesShopWebPath  : mixed
$websiteImagesWebPath  : mixed
$websiteMediaarchive1Path  : mixed
$websiteMediaarchive1WebPath  : mixed
$websiteMediaarchive2Path  : mixed
$websiteMediaarchive2WebPath  : mixed
$websiteMediaarchive3Path  : mixed
$websiteMediaarchive3WebPath  : mixed
$websiteMediaarchive4Path  : mixed
$websiteMediaarchive4WebPath  : mixed
$websiteMediaCrmPath  : mixed
$websiteMediaFileSharingPath  : mixed
$websiteMediaFileSharingWebPath  : mixed
$websiteOffsetPath  : string
The offset path from the website's data repository to the location of the Cloudrexx installation if it is run in a subdirectory.
$websitePath  : string
The absolute path to the website's data repository.
$websitePublicTempPath  : mixed
$websitePublicTempWebPath  : mixed
$websiteTempPath  : string
The absolute path to the temp storage location (/tmp) of the associated Data repository of the website.
$websiteTempWebPath  : string
The offset path to the temp storage location (/tmp) of the associated Data repository of the website.
$websiteThemesPath  : string
The absolute path to the themes storage location (/themes) of the associated Data repository of the website.
$websiteThemesWebPath  : string
The offset path to the themes storage location (/themes) of the associated Data repository of the website.

Methods

adjustRequest()  : void
Ensures that the request was made over a forced protocol and/or domain.
checkSystemState()  : mixed
Terminate if the website is offline
disableCustomExceptionTemplate()  : mixed
Disable custom paths for the exception template
enableCustomExceptionTemplate()  : mixed
Enable custom paths for the exception template
getBackendFolderName()  : string
Return the folder name used to access the backend of the website (/cadmin).
getClassLoader()  : ClassLoader
Return ClassLoader instance
getCliArgs()  : array<string|int, mixed>
Get the arguments passed from CLI
getCodeBaseAdminTemplatePath()  : string
Return the absolute path used to access the backend template of the Code Base of the Cloudrexx installation Formerly known as ASCMS_ADMIN_TEMPLATE_PATH
getCodeBaseAdminTemplateWebPath()  : string
Return the offset path used to access the backend template of the Code Base of the Cloudrexx installation Formerly known as ASCMS_ADMIN_TEMPLATE_WEB_PATH
getCodeBaseConfigPath()  : string
Return the absolute path to the storage location of the configuration files (/config) of the Code Base of the Cloudrexx installation.
getCodeBaseCoreModulePath()  : string
Return the absolute path of the core modules(core_modules) folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_CORE_MODULE_PATH
getCodeBaseCoreModuleWebPath()  : string
Return the offset path of the core modules(core_modules) folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_CORE_MODULE_WEB_PATH
getCodeBaseCorePath()  : string
Return the absolute path to the core components (/core) of the Code Base of the Cloudrexx installation.
getCodeBaseCoreWebPath()  : string
Return the offset path to the core components (/core) of the Code Base of the Cloudrexx installation.
getCodeBaseDocumentRootPath()  : string
Return the absolute path to the Code Base of the Cloudrexx installation.
getCodeBaseFrameworkPath()  : string
Return the absolute path of the FRAMEWORK folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_FRAMEWORK_PATH
getCodeBaseLibraryPath()  : string
The absolute path of the lib folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_LIBRARY_PATH
getCodeBaseModelPath()  : string
Return the absolute path of the lib folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_MODEL_PATH
getCodeBaseModulePath()  : string
Return the absolute path of the module folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_MODULE_PATH
getCodeBaseModuleWebPath()  : string
Return the offset path of the module folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_MODULE_WEB_PATH
getCodeBaseOffsetPath()  : string
Return the offset path from the webserver's DocumentRoot to the location of the Code Base of the Cloudrexx installation.
getCodeBasePath()  : string
Return the base path of the Code Base (webserver's DocumentRoot path).
getCodeBaseThemesPath()  : string
Return the absolute path to the themes storage location (/themes) of the Code Base of the Cloudrexx installation
getCommands()  : mixed
getComponent()  : SystemComponentController
Returns the ComponentController for the given component
getComponentHandler()  : mixed
getConfig()  : SystemConfig
Returns the configuration used by this Cx instance
getConfigFolderName()  : string
Return the folder name of the storage location of the configuration files (/config).
getContentTemplateOfPage()  : string
Fetch the application template of a content page.
getContentTemplateOfPageWithoutWidget()  : string
Fetch the application template of a content page.
getCoreFolderName()  : string
Return the folder name of the storage location of the core components(/core).
getCoreModuleFolderName()  : string
Return the folder name used for the core_modules storage location (/core_modules).
getCurrentSubStage()  : int
Returns the sub-stage this Cx instance is currently in
getDb()  : Db
Returns the database connection handler
getEndcode()  : string
getEvents()  : EventManager
Returns the Cloudrexx event manager instance
getId()  : int
getInstances()  : mixed
getLibraryFolderName()  : string
Return the folder name used for the lib storage location (/lib).
getLicense()  : License
Returns the license for this instance
getMediaSourceManager()  : MediaSourceManager
Get the instance of the MediaSourceManager
getMode()  : string
Returns the mode this instance of Cx is in
getModelFolderName()  : string
Return the folder name used for the model storage location (/model).
getModuleFolderName()  : string
Return the folder name used for the modules storage location (/modules).
getPage()  : Page
Returns the resolved page
getRequest()  : Request
Returns the request URL
getResponse()  : Response
Returns the Response object
getStartTime()  : float
Get script start time
getSystemFolders()  : array<string|int, mixed>
Returns a list of system folders Contains all folders that are re-routed to Cloudrexx by .htaccess
getTemplate()  : Sigma
Returns the main template
getThemesFolderName()  : string
Return the folder name used for the themes (/themes).
getToolbox()  : FWSystem
Returns the toolbox
getUser()  : FWUser
Returns the current user object
getWebsiteBackendPath()  : string
Return the relative path to the backend of the website (/cadmin).
getWebsiteCachePath()  : string
Return the absolute path to the temp storage location (/tmp) of the associated Data repository of the website.
getWebsiteConfigPath()  : string
Return the absolute path to the storage location of the website's config files.
getWebsiteCustomizingPath()  : string
Return the absolute path to the customizing repository of the website.
getWebsiteCustomizingWebPath()  : string
Return the offset path from the website's DocumentRoot to the customizing repository of the website.
getWebsiteDocumentRootPath()  : string
Return the absolute path to the data repository of the Cloudrexx installation.
getWebsiteFeedPath()  : string
Return the absolute path to the feed storage location (/feed) of the Code Base of the Cloudrexx installation Formerly known as ASCMS_FEED_PATH
getWebsiteFeedWebPath()  : string
Return the offset path to the feed storage location (/feed) of the associated Data repository of the website.
getWebsiteImagesAccessPath()  : string
getWebsiteImagesAccessPhotoPath()  : string
Return the absolute path to the data repository of the access photo.
getWebsiteImagesAccessPhotoWebPath()  : string
Return the offset path to the data repository of the access photo.
getWebsiteImagesAccessProfilePath()  : string
Return the absolute path to the data repository of the access profile.
getWebsiteImagesAccessProfileWebPath()  : string
Return the offset path to the data repository of the access profile.
getWebsiteImagesAccessWebPath()  : string
getWebsiteImagesAttachPath()  : string
getWebsiteImagesAttachWebPath()  : string
getWebsiteImagesCalendarPath()  : string
getWebsiteImagesCalendarWebPath()  : string
getWebsiteImagesContentPath()  : string
getWebsiteImagesContentWebPath()  : string
getWebsiteImagesCrmPath()  : string
Return the absolute path to the website's data repository to the location of the /images/Crm
getWebsiteImagesCrmProfilePath()  : string
Return the absolute path from the website's data repository to the location of the /images/Crm/profile
getWebsiteImagesCrmProfileWebPath()  : string
Return the offset path from the website's data repository to the location of the /images/Crm/profile
getWebsiteImagesCrmWebPath()  : string
Return the offset path from the website's data repository to the location of the /images/Crm
getWebsiteImagesDownloadsPath()  : string
getWebsiteImagesDownloadsWebPath()  : string
getWebsiteImagesGalleryPath()  : string
getWebsiteImagesGalleryWebPath()  : string
getWebsiteImagesMediaDirPath()  : string
getWebsiteImagesMediaDirWebPath()  : string
getWebsiteImagesPath()  : string
getWebsiteImagesShopPath()  : string
getWebsiteImagesShopWebPath()  : string
getWebsiteImagesWebPath()  : string
getWebsiteMediaarchive1Path()  : string
getWebsiteMediaarchive1WebPath()  : string
getWebsiteMediaarchive2Path()  : string
getWebsiteMediaarchive2WebPath()  : string
getWebsiteMediaarchive3Path()  : string
getWebsiteMediaarchive3WebPath()  : string
getWebsiteMediaarchive4Path()  : string
getWebsiteMediaarchive4WebPath()  : string
getWebsiteMediaCrmPath()  : string
Return the absolute path from the website's data repository to the location of the /media/Crm
getWebsiteMediaFileSharingPath()  : string
Return the absolute path to the media FileSharing location (/FileSharing) of the associated Data repository of the website.
getWebsiteMediaFileSharingWebPath()  : string
Return the offset path to the media FileSharing location (/FileSharing) of the associated Data repository of the website.
getWebsiteOffsetPath()  : string
Return the offset path from the website's data repository to the location of the Cloudrexx installation if it is run in a subdirectory.
getWebsitePath()  : string
Return the absolute path to the website's data repository.
getWebsitePublicTempPath()  : string
getWebsitePublicTempWebPath()  : string
getWebsiteTempPath()  : string
Return the absolute path to the temp storage location (/tmp) of the associated Data repository of the website.
getWebsiteTempWebPath()  : string
Return the offset path to the temp storage location (/tmp) of the associated Data repository of the website.
getWebsiteThemesPath()  : string
Return the absolute path to the themes storage location (/themes) of the associated Data repository of the website.
getWebsiteThemesWebPath()  : string
Return the offset path to the themes storage location (/themes) of the associated Data repository of the website.
instanciate()  : Cx
This creates instances of this class
isBackendMode()  : bool
Return true if in backend mode
isCliCall()  : bool
Checks if the current call is cli.
isCommandMode()  : bool
Return true if in command mode
isFrontendMode()  : bool
Return true if in frontend mode
isInitialized()  : bool
Whether the init stage has been done
isMinimalMode()  : bool
Return true if in minimal mode
parseGlobalPlaceholders()  : mixed
Set main template placeholders required before parsing the content
registerInstance()  : mixed
Register a \Cx\Core\Core\Controller\Cx compatible object as new instance
setCodeBaseRepository()  : mixed
Set the path to the location of the website's Code Base in the file system.
setExceptionTemplateErrorFilePath()  : mixed
Override the default error template file path
setExceptionTemplateOfflineFilePath()  : mixed
Override the default offline exception template file path
setId()  : mixed
Set the ID of the object
setMemoryLimit()  : mixed
setPage()  : mixed
setWebsiteRepository()  : mixed
Set the path to the location of the website's data repository in the file system.
stopTimer()  : float
Stops time measurement and returns page parsing time
__construct()  : mixed
Initializes the Cx class This does everything related to Cloudrexx.
adjustProtocol()  : null|string
Adjust the protocol to https if https is activated for the current area (frontend|backend)
callPreComponentLoadHooks()  : mixed
Calls preComponentLoad-Hooks PreComponentLoad-Hooks are defined in /config/preComponentLoadHooks.yml
callPreInitHooks()  : mixed
Calls pre-init hooks Pre-Init hooks are defined in /config/preInitHooks.yml.
checkBasicConfiguration()  : mixed
Verifies if the basic configuration has been initialized (settings.php).
checkDomainUrl()  : null|string
Check whether the requested url is correct or not there is a settings option in the general settings section of cloudrexx which allows to force the domain url which is provided
checkInstallationStatus()  : mixed
Checks if Cloudrexx has been set up yet (CONTEXX_INSTALLED).
defineLegacyConstants()  : mixed
Loads legacy constants (set_constants.php / SetCustomizableConstants.php)
finalize()  : mixed
Parses the main template in order to finish request
getComponentControllerByNameAndType()  : SystemComponentController
Get component controller object by given component name and type Calls before the method preInit() and postInit() hooks are called
getExceptionTemplateFilePath()  : string
Return the matching exception template file path
handleCustomizing()  : null
Loads a subclass of this class from customizing if available
init()  : mixed
Loading ClassLoader, EventManager, Env, DB, API and InitCMS (Env, API and InitCMS are deprecated)
initClassLoader()  : mixed
initLegacyEnv()  : mixed
Setting up Env class
legacyGlobalsHook()  : mixed
This populates globals for legacy code
loadComponents()  : mixed
Loads all active components
loadConfig()  : mixed
Load configuration file and set up the path configuration.
loadContent()  : mixed
This parses the content
loadContentTemplateOfPage()  : mixed
loadContrexx()  : mixed
Initializes global template, executes all component hook methods and parses the template.
loadSettings()  : mixed
Loads basic configuration (settings.php) and set basic PHP behavior such as character-set, timezone, etc.
loadTemplate()  : mixed
Init main template object
postComponentLoad()  : mixed
Call post-component-load hook scripts
postContentLoad()  : mixed
Calls hooks after content was processed
postFinalize()  : mixed
Calls hooks after call to finalize()
postInit()  : mixed
Initializes request
postResolve()  : mixed
Calls post-resolve hooks
preComponentLoad()  : mixed
Initialize license and call pre-component-load hook scripts
preContentLoad()  : mixed
Calls hooks before content is processed
preFinalize()  : mixed
Calls hooks before finalize() is called
preInit()  : mixed
Early initializations. Verifies that the system is online (not suspended).
preResolve()  : mixed
Calls pre-resolve hooks
resolve()  : mixed
Does the resolving
secureEnv()  : mixed
Jail current process into the directories of the website's codebase and its data repository.
setCustomizingPath()  : mixed
setMode()  : mixed
Set the mode Cloudrexx is used in
setPostContentLoadPlaceholders()  : type
Set main template placeholders required after content parsing
startTimer()  : void
Starts time measurement for page parsing time
tryToSetMemoryLimit()  : mixed
This tries to set the memory limit if its lower than the needed memory limit

Constants

EXCEPTION_TEMPLATE_ERROR

Exception template shown on error; content is customizable

public mixed EXCEPTION_TEMPLATE_ERROR = 'Error'

EXCEPTION_TEMPLATE_OFFLINE

Exception template shown when offline

public mixed EXCEPTION_TEMPLATE_OFFLINE = 'Offline'

If the website has been disabled in the backend, the content is customizable in the customizing folder only, as the Theme is unknown at that point.

FOLDER_NAME_BACKEND

The folder name used to access the backend of the website (/cadmin).

public string FOLDER_NAME_BACKEND = '/cadmin'

Formerly known as ASCMS_BACKEND_PATH

FOLDER_NAME_CACHE

The folder name used for the cache storage location in temp (/cache).

public string FOLDER_NAME_CACHE = '/cache'

FOLDER_NAME_COMMAND_MODE

The folder name used to access the command mode of the website (/api).

public string FOLDER_NAME_COMMAND_MODE = '/api'

FOLDER_NAME_CONFIG

The folder name of the storage location of the config files (/config).

public string FOLDER_NAME_CONFIG = '/config'

FOLDER_NAME_CORE

The folder name of the storage location of the core components (/core).

public string FOLDER_NAME_CORE = '/core'

Formerly known as ASCMS_CORE_FOLDER.

FOLDER_NAME_CORE_MODULE

The folder name used for the core_modules storage location (/core_modules).

public string FOLDER_NAME_CORE_MODULE = '/core_modules'

Formerly known as ASCMS_CORE_MODULE_FOLDER

FOLDER_NAME_CUSTOMIZING

The folder name used for the customizing storage location (/customizing).

public string FOLDER_NAME_CUSTOMIZING = '/customizing'

FOLDER_NAME_FEED

The folder name used for the application feeds (/feed).

public string FOLDER_NAME_FEED = '/feed'

FOLDER_NAME_IMAGES

public mixed FOLDER_NAME_IMAGES = '/images'

FOLDER_NAME_LIBRARY

The folder name used for the lib storage location (/lib).

public string FOLDER_NAME_LIBRARY = '/lib'

Formerly known as ASCMS_LIBRARY_FOLDER

FOLDER_NAME_MEDIA

public mixed FOLDER_NAME_MEDIA = '/media'

FOLDER_NAME_MODEL

The folder name used for the model storage location (/model).

public string FOLDER_NAME_MODEL = '/model'

Formerly known as ASCMS_MODEL_FOLDER

FOLDER_NAME_MODULE

The folder name used for the modules storage location (/modules).

public string FOLDER_NAME_MODULE = '/modules'

Formerly known as ASCMS_MODULE_FOLDER

FOLDER_NAME_PUBLIC_TEMP

public string FOLDER_NAME_PUBLIC_TEMP = '/public'

FOLDER_NAME_TEMP

The folder name used for the temp storage location (/tmp).

public string FOLDER_NAME_TEMP = '/tmp'

FOLDER_NAME_THEMES

The folder name used for the themes (/themes).

public string FOLDER_NAME_THEMES = '/themes'

MODE_BACKEND

Backend mode

public mixed MODE_BACKEND = 'backend'

In this mode, Cloudrexx show the administrative backend

MODE_COMMAND

Commandline interface mode

public mixed MODE_COMMAND = 'command'

In this mode, Cloudrexx is initialized for commandline usage This mode is BETA at this time

MODE_FRONTEND

Frontend mode

public mixed MODE_FRONTEND = 'frontend'

In this mode, Cloudrexx shows the frontend

MODE_MINIMAL

Minimal mode

public mixed MODE_MINIMAL = 'minimal'

In this mode, the whole environment is loaded, but the main template will not be initialized, no component hooks will be executed and the template will not be parsed This mode is BETA at this time

SUB_STAGE_ADJUST_RESPONSE

public string SUB_STAGE_ADJUST_RESPONSE = 12

Indicates we're in "adjustResponse" sub-stage of stage 3

SUB_STAGE_COMPONENT_LOAD

public string SUB_STAGE_COMPONENT_LOAD = 4

Indicates we're in "componentLoad" sub-stage of stage 2

SUB_STAGE_FINALIZE

public string SUB_STAGE_FINALIZE = 19

Indicates we're in "finalize" sub-stage of stage 3

SUB_STAGE_INIT

public string SUB_STAGE_INIT = 2

Indicates we're in "init" sub-stage of stage 2

SUB_STAGE_LOAD

public string SUB_STAGE_LOAD = 15

Indicates we're in "load" sub-stage of stage 3

SUB_STAGE_POST_COMPONENT_LOAD

public string SUB_STAGE_POST_COMPONENT_LOAD = 7

Indicates we're in "postComponentLoad" sub-stage of stage 2

SUB_STAGE_POST_CONTENT_LOAD

public string SUB_STAGE_POST_CONTENT_LOAD = 17

Indicates we're in "postContentLoad" sub-stage of stage 3

SUB_STAGE_POST_CONTENT_PARSE

public string SUB_STAGE_POST_CONTENT_PARSE = 16

Indicates we're in "postContentParse" sub-stage of stage 3

SUB_STAGE_POST_FINALIZE

public string SUB_STAGE_POST_FINALIZE = 20

Indicates we're in "postFinalize" sub-stage of stage 3

SUB_STAGE_POST_INIT

public string SUB_STAGE_POST_INIT = 8

Indicates we're in "postInit" sub-stage of stage 2

SUB_STAGE_POST_RESOLVE

public string SUB_STAGE_POST_RESOLVE = 11

Indicates we're in "postResolve" sub-stage of stage 3

SUB_STAGE_PRE_COMPONENT_LOAD

public string SUB_STAGE_PRE_COMPONENT_LOAD = 3

Indicates we're in "preComponentLoad" sub-stage of stage 2

SUB_STAGE_PRE_CONTENT_LOAD

public string SUB_STAGE_PRE_CONTENT_LOAD = 13

Indicates we're in "preContentLoad" sub-stage of stage 3

SUB_STAGE_PRE_CONTENT_PARSE

public string SUB_STAGE_PRE_CONTENT_PARSE = 14

Indicates we're in "preContentParse" sub-stage of stage 3

SUB_STAGE_PRE_FINALIZE

public string SUB_STAGE_PRE_FINALIZE = 18

Indicates we're in "preFinalize" sub-stage of stage 3

SUB_STAGE_PRE_INIT

public string SUB_STAGE_PRE_INIT = 1

Indicates we're at the start of stage 2

SUB_STAGE_PRE_RESOLVE

public string SUB_STAGE_PRE_RESOLVE = 9

Indicates we're in "preResolve" sub-stage of stage 3

SUB_STAGE_REGISTER_EVENTLISTENERS

public string SUB_STAGE_REGISTER_EVENTLISTENERS = 6

Indicates we're in "registerEventListeners" sub-stage of stage 2

SUB_STAGE_REGISTER_EVENTS

public string SUB_STAGE_REGISTER_EVENTS = 5

Indicates we're in "registerEvents" sub-stage of stage 2

SUB_STAGE_RESOLVE

public string SUB_STAGE_RESOLVE = 10

Indicates we're in "resolve" sub-stage of stage 3

Properties

$allowCustomExceptionTemplate

Enable customizing the exception template file path

protected bool $allowCustomExceptionTemplate = true

If true, custom templates are searched for first. If false, or if no custom template is found, fall back to the overridden or default template file path. Set to false in components that enforce their own choice using setExceptionTemplateErrorFilePath() or setExceptionTemplateOfflineFilePath().

$autoIncrementValueOfId

Auto-increment value used for the next Cx object to be instanciated.

protected static mixed $autoIncrementValueOfId = 0

$codeBaseAdminTemplatePath

The absolute path used to access the backend template of the Code Base of the Cloudrexx installation Formerly known as ASCMS_ADMIN_TEMPLATE_PATH

protected string $codeBaseAdminTemplatePath = null

$codeBaseAdminTemplateWebPath

The offset path used to access the backend template of the Code Base of the Cloudrexx installation.

protected string $codeBaseAdminTemplateWebPath = null

Formerly known as ASCMS_ADMIN_TEMPLATE_WEB_PATH.

$codeBaseConfigPath

The absolute path to the storage location of the configuration files (/config) of the Code Base of the Cloudrexx installation.

protected string $codeBaseConfigPath = null

$codeBaseCoreModulePath

The absolute path of the core modules(core_modules) folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_CORE_MODULE_PATH

protected string $codeBaseCoreModulePath = null

$codeBaseCoreModuleWebPath

The offset path of the core modules(core_modules) folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_CORE_MODULE_WEB_PATH

protected string $codeBaseCoreModuleWebPath = null

$codeBaseCorePath

The absolute path to the core components (/core) of the Code Base of the Cloudrexx installation.

protected string $codeBaseCorePath = null

Formerly known as ASCMS_CORE_PATH.

$codeBaseCoreWebPath

The offset path to the core components (/core) of the Code Base of the Cloudrexx installation.

protected string $codeBaseCoreWebPath = null

$codeBaseDocumentRootPath

The absolute path to the Code Base of the Cloudrexx installation.

protected string $codeBaseDocumentRootPath = null

Formerly known as ASCMS_DOCUMENT_ROOT.

$codeBaseFrameworkPath

The absolute path of the FRAMEWORK folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_FRAMEWORK_PATH

protected string $codeBaseFrameworkPath = null

$codeBaseLibraryPath

The absolute path of the lib folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_LIBRARY_PATH

protected string $codeBaseLibraryPath = null

$codeBaseModelPath

The absolute path of the model folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_MODEL_PATH

protected string $codeBaseModelPath = null

$codeBaseModulePath

The absolute path of the module folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_MODULE_PATH

protected string $codeBaseModulePath = null

$codeBaseModuleWebPath

The offset path of the module folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_MODULE_WEB_PATH

protected string $codeBaseModuleWebPath = null

$codeBaseOffsetPath

The offset path from the webserver's DocumentRoot to the location of the Code Base of the Cloudrexx installation.

protected string $codeBaseOffsetPath = null

Formerly known as ASCMS_PATH_OFFSET.

$codeBasePath

The webserver's DocumentRoot path.

protected string $codeBasePath = null

Formerly known as ASCMS_PATH.

$codeBaseThemesPath

The absolute path to the themes storage location (/themes) of the Code Base of the Cloudrexx installation

protected string $codeBaseThemesPath = null

$commands

List of available commands in command mode. Key is command name, value is the responsible component.

protected array<string|int, mixed> $commands = array()

This will be null for all modes except command mode.

$currentSubStage

protected int $currentSubStage = 0

Current sub-stage (see SUB_STAGE_* constants) in stage 2 and 3. 0 in stage 1.

Tags
todo

In stage 3 of command mode value is currently fixed to self::SUB_STAGE_PRE_RESOLVE.

$customizingPath

If null, customizing is deactivated

protected string $customizingPath = null

$db

Database connection handler

protected Db $db = null

$endcode

protected string $endcode

The processed data to be sent to the client as response

$exceptionTemplateErrorFilePath

Override the error template file path

protected string $exceptionTemplateErrorFilePath = ''

If empty, the default (or custom, if enabled) template applies.

$exceptionTemplateOfflineFilePath

Override the offline exception template file path

protected string $exceptionTemplateOfflineFilePath = ''

If empty, the default (or custom, if enabled) template applies.

$id

Id of the Cx object

protected mixed $id = 0

$initialized

protected bool $initialized = false

Set to true once init stage is done, false otherwise

$instances

Holds references to all currently loaded Cx instances

protected static array<string|int, mixed> $instances = array()

The first one is the normally used one, all others are special. This is a two dimensional array. The first level key is the configuration file path. Each of these entries contains a list of all Cloudrexx instances for this config file.

$langId

Current language id

protected int $langId = null

$memoryLimit

protected int $memoryLimit = 48

The memory limit. Is set in init

$mode

System mode

protected string $mode = null

Mode as string (see constants)

$preferredInstance

Holds the reference to preferred instance of this class

protected static Cx $preferredInstance = null

Normally this is the first instance. In special environments (an example would be the environment for the MultiSite component) this may be a different instance.

$preLoadedComponents

protected array<string|int, mixed> $preLoadedComponents = []

Contains the preloaded components from preInit and preComponentLoad

$resolvedPage

If null, page is not resolved yet

protected Page $resolvedPage = null

$resolver

Resolver used for page resolving (for the moment frontend mode only)

protected Resolver $resolver = null

$startTime

Microseconds of the time this request was initiated since Unix epoch.

protected float $startTime

$toolbox

Cloudrexx toolbox

protected FWSystem $toolbox = null
Tags
todo

Update FWSystem

$websiteConfigPath

The absolute path to the storage location of the website's config files (/config).

protected string $websiteConfigPath = null

$websiteCustomizingPath

The absolute path to the customizing repository of the website.

protected string $websiteCustomizingPath = null

Formerly known as ASCMS_CUSTOMIZING_PATH.

$websiteCustomizingWebPath

The offset path from the website's DocumentRoot to the customizing repository of the website.

protected string $websiteCustomizingWebPath = null

Formerly known as ASCMS_CUSTOMIZING_WEB_PATH.

$websiteDocumentRootPath

The absolute path to the data repository of the Cloudrexx installation.

protected string $websiteDocumentRootPath = null

Formerly known as ASCMS_INSTANCE_DOCUMENT_ROOT.

$websiteFeedPath

The absolute path to the feed storage location (/feed) of the associated Data repository of the website.

protected string $websiteFeedPath = null

Formerly known as ASCMS_FEED_PATH.

$websiteFeedWebPath

protected mixed $websiteFeedWebPath

$websiteImagesAccessPath

protected mixed $websiteImagesAccessPath

$websiteImagesAccessPhotoPath

protected mixed $websiteImagesAccessPhotoPath

$websiteImagesAccessPhotoWebPath

protected mixed $websiteImagesAccessPhotoWebPath

$websiteImagesAccessProfilePath

protected mixed $websiteImagesAccessProfilePath

$websiteImagesAccessProfileWebPath

protected mixed $websiteImagesAccessProfileWebPath

$websiteImagesAccessWebPath

protected mixed $websiteImagesAccessWebPath

$websiteImagesAttachPath

protected mixed $websiteImagesAttachPath

$websiteImagesAttachWebPath

protected mixed $websiteImagesAttachWebPath

$websiteImagesCalendarPath

protected mixed $websiteImagesCalendarPath

$websiteImagesCalendarWebPath

protected mixed $websiteImagesCalendarWebPath

$websiteImagesContentPath

protected mixed $websiteImagesContentPath

$websiteImagesContentWebPath

protected mixed $websiteImagesContentWebPath

$websiteImagesCrmPath

protected mixed $websiteImagesCrmPath

$websiteImagesCrmProfilePath

protected mixed $websiteImagesCrmProfilePath

$websiteImagesCrmProfileWebPath

protected mixed $websiteImagesCrmProfileWebPath

$websiteImagesCrmWebPath

protected mixed $websiteImagesCrmWebPath

$websiteImagesDownloadsPath

protected mixed $websiteImagesDownloadsPath

$websiteImagesDownloadsWebPath

protected mixed $websiteImagesDownloadsWebPath

$websiteImagesGalleryPath

protected mixed $websiteImagesGalleryPath

$websiteImagesGalleryWebPath

protected mixed $websiteImagesGalleryWebPath

$websiteImagesMediaDirPath

protected mixed $websiteImagesMediaDirPath

$websiteImagesMediaDirWebPath

protected mixed $websiteImagesMediaDirWebPath

$websiteImagesPath

protected mixed $websiteImagesPath

$websiteImagesShopPath

protected mixed $websiteImagesShopPath

$websiteImagesShopWebPath

protected mixed $websiteImagesShopWebPath

$websiteImagesWebPath

protected mixed $websiteImagesWebPath

$websiteMediaarchive1Path

protected mixed $websiteMediaarchive1Path

$websiteMediaarchive1WebPath

protected mixed $websiteMediaarchive1WebPath

$websiteMediaarchive2Path

protected mixed $websiteMediaarchive2Path

$websiteMediaarchive2WebPath

protected mixed $websiteMediaarchive2WebPath

$websiteMediaarchive3Path

protected mixed $websiteMediaarchive3Path

$websiteMediaarchive3WebPath

protected mixed $websiteMediaarchive3WebPath

$websiteMediaarchive4Path

protected mixed $websiteMediaarchive4Path

$websiteMediaarchive4WebPath

protected mixed $websiteMediaarchive4WebPath

$websiteMediaCrmPath

protected mixed $websiteMediaCrmPath

$websiteMediaFileSharingPath

protected mixed $websiteMediaFileSharingPath

$websiteMediaFileSharingWebPath

protected mixed $websiteMediaFileSharingWebPath

$websiteOffsetPath

The offset path from the website's data repository to the location of the Cloudrexx installation if it is run in a subdirectory.

protected string $websiteOffsetPath = null

Formerly known as ASCMS_INSTANCE_OFFSET.

$websitePath

The absolute path to the website's data repository.

protected string $websitePath = null

Formerly known as ASCMS_INSTANCE_PATH.

$websitePublicTempPath

protected mixed $websitePublicTempPath

$websitePublicTempWebPath

protected mixed $websitePublicTempWebPath

$websiteTempPath

The absolute path to the temp storage location (/tmp) of the associated Data repository of the website.

protected string $websiteTempPath = null

Formerly known as ASCMS_TEMP_PATH.

$websiteTempWebPath

The offset path to the temp storage location (/tmp) of the associated Data repository of the website.

protected string $websiteTempWebPath = null

Formerly known as ASCMS_TEMP_WEB_PATH.

$websiteThemesPath

The absolute path to the themes storage location (/themes) of the associated Data repository of the website.

protected string $websiteThemesPath = null

Formerly known as ASCMS_THEMES_PATH.

$websiteThemesWebPath

The offset path to the themes storage location (/themes) of the associated Data repository of the website.

protected string $websiteThemesWebPath = null

Formerly known as ASCMS_THEMES_WEB_PATH.

Methods

adjustRequest()

Ensures that the request was made over a forced protocol and/or domain.

public adjustRequest([Url|null $target = null ][, int $httpStatus = 301 ]) : void

If required, a redirect response to the forced protocol and/or domain will be sent to the client. In case the protocol must be adjusted to https, then the forced domain (if at all) along with $target and $httpStatus are ignored. This is required to support HSTS preloading.

Parameters
$target : Url|null = null

Set an optional target URL to redirect the user to. If set, the user will be redirected even if the requested protocol and domain are already in compliance.

$httpStatus : int = 301

HTTP status code to send along with the redirect response. Defaults to 301.

Tags
todo

Implement protocol and domain adjustments as rewrite rules. See CLX-5700.

checkSystemState()

Terminate if the website is offline

public checkSystemState([bool $disableAllModes = false ]) : mixed

The "systemStatus" config must be "on" in order for the website to be accessible. By default, only the frontend mode is affected. If $disableAllModes is true, all modes are disabled.

Parameters
$disableAllModes : bool = false

Disable all modes if true

Tags
throws
OfflineInstanceException

when offline

disableCustomExceptionTemplate()

Disable custom paths for the exception template

public disableCustomExceptionTemplate() : mixed

enableCustomExceptionTemplate()

Enable custom paths for the exception template

public enableCustomExceptionTemplate() : mixed

getBackendFolderName()

Return the folder name used to access the backend of the website (/cadmin).

public getBackendFolderName() : string

Formerly known as ASCMS_BACKEND_PATH

Return values
string

getCliArgs()

Get the arguments passed from CLI

public static getCliArgs() : array<string|int, mixed>

Only return data if in CLI-mode (static::isCliCall()).

Tags
todo

Move to \Cx\Core\Routing\Model\Entity\Request and convert into a non-static method

Return values
array<string|int, mixed>

List of arguments pass from CLI

getCodeBaseAdminTemplatePath()

Return the absolute path used to access the backend template of the Code Base of the Cloudrexx installation Formerly known as ASCMS_ADMIN_TEMPLATE_PATH

public getCodeBaseAdminTemplatePath() : string
Return values
string

getCodeBaseAdminTemplateWebPath()

Return the offset path used to access the backend template of the Code Base of the Cloudrexx installation Formerly known as ASCMS_ADMIN_TEMPLATE_WEB_PATH

public getCodeBaseAdminTemplateWebPath() : string
Return values
string

getCodeBaseConfigPath()

Return the absolute path to the storage location of the configuration files (/config) of the Code Base of the Cloudrexx installation.

public getCodeBaseConfigPath() : string
Return values
string

getCodeBaseCoreModulePath()

Return the absolute path of the core modules(core_modules) folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_CORE_MODULE_PATH

public getCodeBaseCoreModulePath() : string
Return values
string

getCodeBaseCoreModuleWebPath()

Return the offset path of the core modules(core_modules) folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_CORE_MODULE_WEB_PATH

public getCodeBaseCoreModuleWebPath() : string
Return values
string

getCodeBaseCorePath()

Return the absolute path to the core components (/core) of the Code Base of the Cloudrexx installation.

public getCodeBaseCorePath() : string

Formerly known as ASCMS_CORE_PATH.

Return values
string

getCodeBaseCoreWebPath()

Return the offset path to the core components (/core) of the Code Base of the Cloudrexx installation.

public getCodeBaseCoreWebPath() : string
Return values
string

getCodeBaseDocumentRootPath()

Return the absolute path to the Code Base of the Cloudrexx installation.

public getCodeBaseDocumentRootPath() : string

Formerly known as ASCMS_DOCUMENT_ROOT.

Return values
string

getCodeBaseFrameworkPath()

Return the absolute path of the FRAMEWORK folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_FRAMEWORK_PATH

public getCodeBaseFrameworkPath() : string
Return values
string

getCodeBaseLibraryPath()

The absolute path of the lib folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_LIBRARY_PATH

public getCodeBaseLibraryPath() : string
Return values
string

getCodeBaseModelPath()

Return the absolute path of the lib folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_MODEL_PATH

public getCodeBaseModelPath() : string
Return values
string

getCodeBaseModulePath()

Return the absolute path of the module folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_MODULE_PATH

public getCodeBaseModulePath() : string
Return values
string

getCodeBaseModuleWebPath()

Return the offset path of the module folder of the Code Base of the Cloudrexx installation Formerly known as ASCMS_MODULE_WEB_PATH

public getCodeBaseModuleWebPath() : string
Return values
string

getCodeBaseOffsetPath()

Return the offset path from the webserver's DocumentRoot to the location of the Code Base of the Cloudrexx installation.

public getCodeBaseOffsetPath() : string

Formerly known as ASCMS_PATH_OFFSET.

Return values
string

getCodeBasePath()

Return the base path of the Code Base (webserver's DocumentRoot path).

public getCodeBasePath() : string

Formerly known as ASCMS_PATH.

Return values
string

getCodeBaseThemesPath()

Return the absolute path to the themes storage location (/themes) of the Code Base of the Cloudrexx installation

public getCodeBaseThemesPath() : string
Return values
string

getCommands()

public getCommands([mixed $params = array() ][, mixed $forceRegen = false ]) : mixed
Parameters
$params : mixed = array()
$forceRegen : mixed = false

getComponent()

Returns the ComponentController for the given component

public getComponent(string $name) : SystemComponentController

All new classes should have access to $this->getComponent()

Parameters
$name : string

Component name

Return values
SystemComponentController

Component main controller

getComponentHandler()

public getComponentHandler() : mixed

getConfigFolderName()

Return the folder name of the storage location of the configuration files (/config).

public getConfigFolderName() : string
Return values
string

getContentTemplateOfPage()

Fetch the application template of a content page.

public static getContentTemplateOfPage(Page $page[, string $component = null ][, string $themeType = CxCoreViewModelEntityTheme::THEME_TYPE_WEB ][, bool $parseWidgets = true ]) : string
Parameters
$page : Page

The page object of which to fetch the application template from

$component : string = null

Optional argument to specify the component to load the template from, instead of using the page's module-attribute

$themeType : string = CxCoreViewModelEntityTheme::THEME_TYPE_WEB

Optional argument to specify the output channel

$parseWidgets : bool = true

Whether any widgets shall get parsed in the content or not. If set to FALSE, then the raw (unparsed) content will be returned.

Return values
string

The content of the application template

getContentTemplateOfPageWithoutWidget()

Fetch the application template of a content page.

public static getContentTemplateOfPageWithoutWidget(Page $page[, string $component = null ][, string $themeType = CxCoreViewModelEntityTheme::THEME_TYPE_WEB ]) : string
Parameters
$page : Page

The page object of which to fetch the application template from

$component : string = null

Optional argument to specify the component to load the template from, instead of using the page's module-attribute

$themeType : string = CxCoreViewModelEntityTheme::THEME_TYPE_WEB

Optional argument to specify the output channel

Return values
string

The content of the application template

getCoreFolderName()

Return the folder name of the storage location of the core components(/core).

public getCoreFolderName() : string

Formerly known as ASCMS_CORE_FOLDER.

Return values
string

getCoreModuleFolderName()

Return the folder name used for the core_modules storage location (/core_modules).

public getCoreModuleFolderName() : string

Formerly known as ASCMS_CORE_MODULE_FOLDER.

Return values
string

getCurrentSubStage()

Returns the sub-stage this Cx instance is currently in

public getCurrentSubStage() : int

Returns 0 string for stage 1. As minimal mode does not have any sub-stages in stage 3, value keeps at static::SUB_STAGE_PRE_RESOLVE in this case. Does not yet track sub-stages of command mode. Instead value is set to static::SUB_STAGE_PRE_RESOLVE in stage 3 of command mode.

Return values
int

One of the SUB_STAGE_* constants or 0

getDb()

Returns the database connection handler

public getDb() : Db
Return values
Db

DB connection handler

getEndcode()

public getEndcode() : string
Return values
string

The processed data which is set in finalize

getId()

public getId() : int
Return values
int

getInstances()

public static getInstances() : mixed

getLibraryFolderName()

Return the folder name used for the lib storage location (/lib).

public getLibraryFolderName() : string

Formerly known as ASCMS_LIBRARY_FOLDER.

Return values
string

getMode()

Returns the mode this instance of Cx is in

public getMode() : string
Return values
string

One of 'cli', 'frontend', 'backend', 'minimal'

getModelFolderName()

Return the folder name used for the model storage location (/model).

public getModelFolderName() : string

Formerly known as ASCMS_MODEL_FOLDER.

Return values
string

getModuleFolderName()

Return the folder name used for the modules storage location (/modules).

public getModuleFolderName() : string

Formerly known as ASCMS_MODULE_FOLDER.

Return values
string

getPage()

Returns the resolved page

public getPage() : Page

Please note, that this works only if mode is self::MODE_FRONTEND by now If resolving has not taken place yet, null is returned

Return values
Page

Resolved page or null

getStartTime()

Get script start time

public getStartTime() : float
Return values
float

Microseconds of the time this request was initiated since Unix epoch.

getSystemFolders()

Returns a list of system folders Contains all folders that are re-routed to Cloudrexx by .htaccess

public getSystemFolders() : array<string|int, mixed>
Return values
array<string|int, mixed>

List of folders relative to website offset path

getTemplate()

Returns the main template

public getTemplate() : Sigma
Return values
Sigma

Main template

getThemesFolderName()

Return the folder name used for the themes (/themes).

public getThemesFolderName() : string
Return values
string

getUser()

Returns the current user object

public getUser() : FWUser
Return values
FWUser

Current user

getWebsiteBackendPath()

Return the relative path to the backend of the website (/cadmin).

public getWebsiteBackendPath() : string
Return values
string

getWebsiteCachePath()

Return the absolute path to the temp storage location (/tmp) of the associated Data repository of the website.

public getWebsiteCachePath() : string

Formerly known as ASCMS_CACHE_PATH.

Return values
string

getWebsiteConfigPath()

Return the absolute path to the storage location of the website's config files.

public getWebsiteConfigPath() : string
Return values
string

getWebsiteCustomizingPath()

Return the absolute path to the customizing repository of the website.

public getWebsiteCustomizingPath() : string

Formerly known as ASCMS_CUSTOMIZING_PATH.

Return values
string

getWebsiteCustomizingWebPath()

Return the offset path from the website's DocumentRoot to the customizing repository of the website.

public getWebsiteCustomizingWebPath() : string

Formerly known as ASCMS_CUSTOMIZING_WEB_PATH.

Return values
string

getWebsiteDocumentRootPath()

Return the absolute path to the data repository of the Cloudrexx installation.

public getWebsiteDocumentRootPath() : string

Formerly known as ASCMS_INSTANCE_DOCUMENT_ROOT.

Return values
string

getWebsiteFeedPath()

Return the absolute path to the feed storage location (/feed) of the Code Base of the Cloudrexx installation Formerly known as ASCMS_FEED_PATH

public getWebsiteFeedPath() : string
Return values
string

getWebsiteFeedWebPath()

Return the offset path to the feed storage location (/feed) of the associated Data repository of the website.

public getWebsiteFeedWebPath() : string

Formerly known as ASCMS_FEED_WEB_PATH

Return values
string

getWebsiteImagesAccessPath()

public getWebsiteImagesAccessPath() : string
Return values
string

getWebsiteImagesAccessPhotoPath()

Return the absolute path to the data repository of the access photo.

public getWebsiteImagesAccessPhotoPath() : string

Formerly known as ASCMS_ACCESS_PHOTO_IMG_PATH.

Return values
string

getWebsiteImagesAccessPhotoWebPath()

Return the offset path to the data repository of the access photo.

public getWebsiteImagesAccessPhotoWebPath() : string

Formerly known as ASCMS_ACCESS_PHOTO_IMG_WEB_PATH.

Return values
string

getWebsiteImagesAccessProfilePath()

Return the absolute path to the data repository of the access profile.

public getWebsiteImagesAccessProfilePath() : string

Formerly known as ASCMS_ACCESS_PROFILE_IMG_PATH.

Return values
string

getWebsiteImagesAccessProfileWebPath()

Return the offset path to the data repository of the access profile.

public getWebsiteImagesAccessProfileWebPath() : string

Formerly known as ASCMS_ACCESS_PROFILE_IMG_WEB_PATH.

Return values
string

getWebsiteImagesAccessWebPath()

public getWebsiteImagesAccessWebPath() : string
Return values
string

getWebsiteImagesAttachPath()

public getWebsiteImagesAttachPath() : string
Return values
string

getWebsiteImagesAttachWebPath()

public getWebsiteImagesAttachWebPath() : string
Return values
string

getWebsiteImagesCalendarPath()

public getWebsiteImagesCalendarPath() : string
Return values
string

getWebsiteImagesCalendarWebPath()

public getWebsiteImagesCalendarWebPath() : string
Return values
string

getWebsiteImagesContentPath()

public getWebsiteImagesContentPath() : string
Return values
string

getWebsiteImagesContentWebPath()

public getWebsiteImagesContentWebPath() : string
Return values
string

getWebsiteImagesCrmPath()

Return the absolute path to the website's data repository to the location of the /images/Crm

public getWebsiteImagesCrmPath() : string
Return values
string

getWebsiteImagesCrmProfilePath()

Return the absolute path from the website's data repository to the location of the /images/Crm/profile

public getWebsiteImagesCrmProfilePath() : string
Return values
string

getWebsiteImagesCrmProfileWebPath()

Return the offset path from the website's data repository to the location of the /images/Crm/profile

public getWebsiteImagesCrmProfileWebPath() : string
Return values
string

getWebsiteImagesCrmWebPath()

Return the offset path from the website's data repository to the location of the /images/Crm

public getWebsiteImagesCrmWebPath() : string
Return values
string

getWebsiteImagesDownloadsPath()

public getWebsiteImagesDownloadsPath() : string
Return values
string

getWebsiteImagesDownloadsWebPath()

public getWebsiteImagesDownloadsWebPath() : string
Return values
string

getWebsiteImagesGalleryPath()

public getWebsiteImagesGalleryPath() : string
Return values
string

getWebsiteImagesGalleryWebPath()

public getWebsiteImagesGalleryWebPath() : string
Return values
string

getWebsiteImagesMediaDirPath()

public getWebsiteImagesMediaDirPath() : string
Return values
string

getWebsiteImagesMediaDirWebPath()

public getWebsiteImagesMediaDirWebPath() : string
Return values
string

getWebsiteImagesPath()

public getWebsiteImagesPath() : string
Return values
string

getWebsiteImagesShopPath()

public getWebsiteImagesShopPath() : string
Return values
string

getWebsiteImagesShopWebPath()

public getWebsiteImagesShopWebPath() : string
Return values
string

getWebsiteImagesWebPath()

public getWebsiteImagesWebPath() : string
Return values
string

getWebsiteMediaarchive1Path()

public getWebsiteMediaarchive1Path() : string
Return values
string

getWebsiteMediaarchive1WebPath()

public getWebsiteMediaarchive1WebPath() : string
Return values
string

getWebsiteMediaarchive2Path()

public getWebsiteMediaarchive2Path() : string
Return values
string

getWebsiteMediaarchive2WebPath()

public getWebsiteMediaarchive2WebPath() : string
Return values
string

getWebsiteMediaarchive3Path()

public getWebsiteMediaarchive3Path() : string
Return values
string

getWebsiteMediaarchive3WebPath()

public getWebsiteMediaarchive3WebPath() : string
Return values
string

getWebsiteMediaarchive4Path()

public getWebsiteMediaarchive4Path() : string
Return values
string

getWebsiteMediaarchive4WebPath()

public getWebsiteMediaarchive4WebPath() : string
Return values
string

getWebsiteMediaCrmPath()

Return the absolute path from the website's data repository to the location of the /media/Crm

public getWebsiteMediaCrmPath() : string
Return values
string

getWebsiteMediaFileSharingPath()

Return the absolute path to the media FileSharing location (/FileSharing) of the associated Data repository of the website.

public getWebsiteMediaFileSharingPath() : string

Formerly known as ASCMS_FILESHARING_PATH.

Return values
string

getWebsiteMediaFileSharingWebPath()

Return the offset path to the media FileSharing location (/FileSharing) of the associated Data repository of the website.

public getWebsiteMediaFileSharingWebPath() : string

Formerly known as ASCMS_FILESHARING_WEB_PATH.

Return values
string

getWebsiteOffsetPath()

Return the offset path from the website's data repository to the location of the Cloudrexx installation if it is run in a subdirectory.

public getWebsiteOffsetPath() : string

Formerly known as ASCMS_INSTANCE_OFFSET.

Return values
string

getWebsitePath()

Return the absolute path to the website's data repository.

public getWebsitePath() : string

Formerly known as ASCMS_INSTANCE_PATH.

Return values
string

getWebsitePublicTempPath()

public getWebsitePublicTempPath() : string
Return values
string

getWebsitePublicTempWebPath()

public getWebsitePublicTempWebPath() : string
Return values
string

getWebsiteTempPath()

Return the absolute path to the temp storage location (/tmp) of the associated Data repository of the website.

public getWebsiteTempPath() : string

Formerly known as ASCMS_TEMP_PATH.

Return values
string

getWebsiteTempWebPath()

Return the offset path to the temp storage location (/tmp) of the associated Data repository of the website.

public getWebsiteTempWebPath() : string

Formerly known as ASCMS_TEMP_WEB_PATH.

Return values
string

getWebsiteThemesPath()

Return the absolute path to the themes storage location (/themes) of the associated Data repository of the website.

public getWebsiteThemesPath() : string

Formerly known as ASCMS_THEMES_PATH.

Return values
string

getWebsiteThemesWebPath()

Return the offset path to the themes storage location (/themes) of the associated Data repository of the website.

public getWebsiteThemesWebPath() : string

Formerly known as ASCMS_THEMES_WEB_PATH.

Return values
string

instanciate()

This creates instances of this class

public static instanciate([string $mode = null ][, bool $forceNew = false ][, string $configFilePath = '' ][, bool $setAsPreferred = false ][, mixed $checkInstallationStatus = true ][, bool $throwExceptions = false ]) : Cx

Normally the first instance is returned. You may set another instance to be the preferred one using the $setAsPreferred argument.

Parameters
$mode : string = null

(optional) One of the modes listed in constants above

$forceNew : bool = false

(optional) Wheter to force a new instance or not, default false

$configFilePath : string = ''

(optional) The absolute path to a Cloudrexx configuration file (configuration.php) that shall be loaded instead of the default one.

$setAsPreferred : bool = false

(optional) Sets this instance as the preferred one for later

$checkInstallationStatus : mixed = true
$throwExceptions : bool = false

By default, exceptions are handled internally. Set to true (recommended) to handle exceptions manually.

Return values
Cx

Instance of this class

isBackendMode()

Return true if in backend mode

public isBackendMode() : bool
Return values
bool

isCliCall()

Checks if the current call is cli.

public static isCliCall() : bool
Return values
bool

the result whether it is a cli call

isCommandMode()

Return true if in command mode

public isCommandMode() : bool
Return values
bool

isFrontendMode()

Return true if in frontend mode

public isFrontendMode() : bool
Return values
bool

isInitialized()

Whether the init stage has been done

public isInitialized() : bool
Return values
bool

True if init is done, false otherwise

isMinimalMode()

Return true if in minimal mode

public isMinimalMode() : bool
Return values
bool

parseGlobalPlaceholders()

Set main template placeholders required before parsing the content

public parseGlobalPlaceholders(string &$content) : mixed
Parameters
$content : string
Tags
todo

Does this even make any sense? Couldn't simply everything be set after content parsing?

todo

Remove usage of globals

global

array $_CONFIG

registerInstance()

Register a \Cx\Core\Core\Controller\Cx compatible object as new instance

public static registerInstance(Cx $cx[, string $configFilePath = '' ][, bool $setAsPreferred = false ]) : mixed
Parameters
$cx : Cx

Instanciated Cx object

$configFilePath : string = ''

The absolute path to a Cloudrexx configuration file (configuration.php).

$setAsPreferred : bool = false

Whether or not to set the Cx instance as preferred instance to be used

setCodeBaseRepository()

Set the path to the location of the website's Code Base in the file system.

public setCodeBaseRepository(mixed $codeBasePath, mixed $codeBaseOffsetPath) : mixed
Parameters
$codeBasePath : mixed
$codeBaseOffsetPath : mixed

setExceptionTemplateErrorFilePath()

Override the default error template file path

public setExceptionTemplateErrorFilePath(string $filePath) : mixed
Parameters
$filePath : string

setExceptionTemplateOfflineFilePath()

Override the default offline exception template file path

public setExceptionTemplateOfflineFilePath(string $filePath) : mixed
Parameters
$filePath : string

setId()

Set the ID of the object

public setId(mixed $id) : mixed

WARNING: Setting the ID manually might break the system! Only do it in respect to self::$autoIncrementValueOfId.

Parameters
$id : mixed

setMemoryLimit()

public setMemoryLimit(int $memoryLimit) : mixed
Parameters
$memoryLimit : int

setPage()

public setPage(mixed $page) : mixed
Parameters
$page : mixed

setWebsiteRepository()

Set the path to the location of the website's data repository in the file system.

public setWebsiteRepository(string $websitePath, string $websiteOffsetPath) : mixed
Parameters
$websitePath : string

The absolute path to the website's data repository.

$websiteOffsetPath : string

The offset path from the website's data repository to the location of the Cloudrexx installation if it is run in a subdirectory.

stopTimer()

Stops time measurement and returns page parsing time

public stopTimer() : float
Return values
float

Time needed to parse page in seconds with microsecond precision, rounded to 5 decimal places.

__construct()

Initializes the Cx class This does everything related to Cloudrexx.

protected __construct([string $mode = null ][, string $configFilePath = '' ][, bool $setAsPreferred = false ][, mixed $checkInstallationStatus = true ][, bool $throwExceptions = false ]) : mixed
Parameters
$mode : string = null

(optional) Use constants, one of self::MODE_[FRONTEND|BACKEND|CLI|MINIMAL]

$configFilePath : string = ''

The absolute path to a Cloudrexx configuration file (configuration.php) that shall be loaded instead of the default one.

$setAsPreferred : bool = false

Whether or not to set the Cx instance as preferred instance to be used

$checkInstallationStatus : mixed = true
$throwExceptions : bool = false

By default, exceptions are handled internally. Set to true (recommended) to handle exceptions manually.

adjustProtocol()

Adjust the protocol to https if https is activated for the current area (frontend|backend)

protected adjustProtocol() : null|string
Return values
null|string

the correct protocol

callPreComponentLoadHooks()

Calls preComponentLoad-Hooks PreComponentLoad-Hooks are defined in /config/preComponentLoadHooks.yml

protected callPreComponentLoadHooks() : mixed
Tags
throws
Exception

callPreInitHooks()

Calls pre-init hooks Pre-Init hooks are defined in /config/preInitHooks.yml.

protected callPreInitHooks() : mixed
Tags
throws
Exception

checkBasicConfiguration()

Verifies if the basic configuration has been initialized (settings.php).

protected checkBasicConfiguration() : mixed

If not, the system will halt.

Tags
global

array $_CONFIG Configuration array from /config/settings.php

checkDomainUrl()

Check whether the requested url is correct or not there is a settings option in the general settings section of cloudrexx which allows to force the domain url which is provided

protected checkDomainUrl() : null|string
Return values
null|string

the correct domain url

checkInstallationStatus()

Checks if Cloudrexx has been set up yet (CONTEXX_INSTALLED).

protected checkInstallationStatus() : mixed

If not, an error message will be shown.

Tags
todo

Throw exception instead of calling die()

defineLegacyConstants()

Loads legacy constants (set_constants.php / SetCustomizableConstants.php)

protected defineLegacyConstants() : mixed

finalize()

Parses the main template in order to finish request

protected finalize() : mixed
Tags
todo

Remove usage of globals

global

type $themesPages

global

array $_CONFIG

global

type $subMenuTitle

global

type $_CORELANG

global

type $plainCmd

global

type $cmd

getComponentControllerByNameAndType()

Get component controller object by given component name and type Calls before the method preInit() and postInit() hooks are called

protected getComponentControllerByNameAndType(string $componentName, string $componentType) : SystemComponentController
Parameters
$componentName : string

component name

$componentType : string

component type

Return values
SystemComponentController

getExceptionTemplateFilePath()

Return the matching exception template file path

protected getExceptionTemplateFilePath([string $baseName = '' ]) : string

If enabled, custom paths are searched for a template. If a match is found, that is returned. If the respective exception template path property is non-empty, and the file exsists, it overrides the default, and is returned unchanged. Otherwise, the default template for the given base name is returned. Empty or invalid base names fall back to 'Error'. Note that custom paths below the theme folder are only supported after init() has run, and the EntityManager is available.

Parameters
$baseName : string = ''

Optional template base name

Return values
string

handleCustomizing()

Loads a subclass of this class from customizing if available

protected handleCustomizing() : null
Return values
null

init()

Loading ClassLoader, EventManager, Env, DB, API and InitCMS (Env, API and InitCMS are deprecated)

protected init() : mixed
Tags
todo

Remove deprecated elements

todo

Remove usage of globals

global

type $_DBCONFIG

global

type $objDatabase

initClassLoader()

protected initClassLoader() : mixed

initLegacyEnv()

Setting up Env class

protected initLegacyEnv() : mixed
Tags
global

array $_CONFIG Configuration array from /config/settings.php

legacyGlobalsHook()

This populates globals for legacy code

protected legacyGlobalsHook(int $no) : mixed
Parameters
$no : int

Hook number

Tags
todo

Avoid this! All this should be part of some components hook

global

type $objFWUser

global

type $objTemplate

global

type $cl

global

\InitCMS $objInit

global

type $_LANGID

global

type $_CORELANG

global

\Cx\Core\Routing\Url $url

loadComponents()

Loads all active components

protected loadComponents() : mixed

loadConfig()

Load configuration file and set up the path configuration.

protected loadConfig([mixed $configFilePath = '' ]) : mixed
Parameters
$configFilePath : mixed = ''
Tags
global

array $_PATHCONFIG Path configuration from /config/configuration.php

loadContent()

This parses the content

protected loadContent() : mixed

This cannot be used in mode self::MODE_COMMAND, since content is added to template directly

Tags
todo

Write a method, that only returns the content, in order to allow usage in CLI mode

todo

Remove usage of globals

global

type $plainSection

global

type $_ARRAYLANG

loadContentTemplateOfPage()

protected loadContentTemplateOfPage() : mixed

loadContrexx()

Initializes global template, executes all component hook methods and parses the template.

protected loadContrexx() : mixed

loadSettings()

Loads basic configuration (settings.php) and set basic PHP behavior such as character-set, timezone, etc.

protected loadSettings() : mixed
Tags
todo

Find a way to store configuration by avoiding global variables

global

array $_CONFIG Configuration array from /config/settings.php

loadTemplate()

Init main template object

protected loadTemplate() : mixed

In backend mode, ASCMS_ADMIN_TEMPLATE_PATH/index.html is opened In all other modes, no file is loaded here

postComponentLoad()

Call post-component-load hook scripts

protected postComponentLoad() : mixed

postContentLoad()

Calls hooks after content was processed

protected postContentLoad() : mixed

postFinalize()

Calls hooks after call to finalize()

protected postFinalize() : mixed

postInit()

Initializes request

protected postInit() : mixed

postResolve()

Calls post-resolve hooks

protected postResolve() : mixed
Tags
todo

Remove usage of globals

preComponentLoad()

Initialize license and call pre-component-load hook scripts

protected preComponentLoad() : mixed
Tags
throws
DbException
throws
Exception

preContentLoad()

Calls hooks before content is processed

protected preContentLoad() : mixed
Tags
todo

Remove usage of globals

global

type $plainCmd

global

type $plainSection

global

type $themesPages

global

type $page_template

preFinalize()

Calls hooks before finalize() is called

protected preFinalize() : mixed

preInit()

Early initializations. Verifies that the system is online (not suspended).

protected preInit() : mixed

Initializes the ClassLoader, the legacy Environment variables and executes the preInit-hook-scripts. Finally it verifies the requested HTTP-Host.

preResolve()

Calls pre-resolve hooks

protected preResolve() : mixed

resolve()

Does the resolving

protected resolve() : mixed

For modes other than 'frontend', no actual resolving is done, resolver is just initialized in order to return the correct result for $resolver->getUrl()

Tags
todo

Implement resolver for backend

todo

Is this useful in CLI mode?

secureEnv()

Jail current process into the directories of the website's codebase and its data repository.

protected secureEnv() : mixed

setCustomizingPath()

protected setCustomizingPath() : mixed

setMode()

Set the mode Cloudrexx is used in

protected setMode(mixed $mode) : mixed
Parameters
$mode : mixed

Mode as string or true for front- or false for backend

setPostContentLoadPlaceholders()

Set main template placeholders required after content parsing

protected setPostContentLoadPlaceholders() : type
Tags
todo

Remove usage of globals

global

array $_CONFIG

global

type $themesPages

global

type $_CORELANG

Return values
type

startTimer()

Starts time measurement for page parsing time

protected startTimer() : void

tryToSetMemoryLimit()

This tries to set the memory limit if its lower than the needed memory limit

protected tryToSetMemoryLimit() : mixed

        
On this page

Search results