Calls hooks after content was processed
postContentLoad()
This loads and controls everything
copyright | CONTREXX CMS - COMVATION AG |
---|---|
author | Michael Ritter |
package | contrexx |
subpackage | core |
link | contrexx homepage |
since | v3.1.0 |
todo | Remove all instances of "global" or at least move them to a single place |
getDb() : \Cx\Core\Model\Db
\Cx\Core\Model\Db
DB connection handlergetEvents() : \Cx\Core\Event\Controller\EventManager
getLicense() : \Cx\Core_Modules\License\License
\Cx\Core_Modules\License\License
getMode() : string
string
One of 'cli', 'frontend', 'backend', 'minimal'getPage() : \Cx\Core\ContentManager\Model\Entity\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
\Cx\Core\ContentManager\Model\Entity\Page
Resolved page or nullgetTemplate() : \Cx\Core\Html\Sigma
\Cx\Core\Html\Sigma
Main templateinstanciate(string $mode, boolean $forceNew) : \Cx\Core\Core\Controller\Cx
Normally the first instance is returned. This method is necessary because of special cases like license update in installer, which has to initialize Cx in order to perform a user login and then including versioncheck.php, which load Cx for standalone operation.
string
(optional) One of the modes listed in constants above
boolean
(optional) Wheter to force a new instance or not, default false
\Cx\Core\Core\Controller\Cx
Instance of this class__construct(string $mode)
string
(optional) Use constants, one of self::MODE_[FRONTEND|BACKEND|CLI|MINIMAL]
adjustProtocol() : null | string
null
string
the correct protocoladjustRequest() : mixed
mixed
checkDomainUrl() : null | string
null
string
the correct domain urlfinalize()
todo | Remove usage of globals |
---|---|
global | type $themesPages |
global | null $moduleStyleFile |
global | type $objCache |
global | array $_CONFIG |
global | type $subMenuTitle |
global | type $_CORELANG |
global | type $plainCmd |
global | type $cmd |
fixPaths(string $documentRoot, string $rootOffset)
string
Document root for this vHost
string
Document root offset for this installation
handleCustomizing() : null
null
init()
todo | Remove deprecated elements |
---|---|
todo | Remove usage of globals |
global | array $_CONFIG |
global | type $_FTPCONFIG |
global | type $objDatabase |
global | type $objInit |
legacyGlobalsHook(int $no)
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 |
int
Hook number
loadComponents()
loadConfig()
configuration.php is loaded in index.php in order to load this file from its correct location.
todo | Find a way to store configuration by avoiding global variables |
---|---|
global | array $_CONFIG Configuration array from /config/settings.php |
global | array $_PATHCONFIG Path configuration from /config/configuration.php |
\Exception |
If the CMS is deactivated, an exception is thrown |
---|
loadContent()
This cannot be used in mode self::MODE_CLI, since content is added to template directly
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 |
loadContrexx()
loadTemplate()
In backend mode, ASCMS_ADMIN_TEMPLATE_PATH/index.html is opened In all other modes, no file is loaded here
postContentLoad()
postFinalize()
postInit()
Loads components
postResolve()
todo | Remove usage of globals |
---|
preContentLoad()
todo | Remove usage of globals |
---|---|
global | null $moduleStyleFile |
global | type $plainCmd |
global | type $plainSection |
preFinalize()
preInit()
Tries to enable APC and increase RAM size
preResolve()
resolve()
For modes other than 'frontend', no actual resolving is done, resolver is just initialized in order to return the correct result for $resolver->getUrl()
todo | Implement resolver for backend |
---|---|
todo | Is this useful in CLI mode? |
setMode(mixed $mode)
mixed
Mode as string or true for front- or false for backend
setPostContentLoadPlaceholders() : \Cx\Core\Core\Controller\type
todo | Remove usage of globals |
---|---|
global | array $_CONFIG |
global | type $themesPages |
global | type $objCounter |
global | type $objBanner |
global | type $_CORELANG |
\Cx\Core\Core\Controller\type
setPreContentLoadPlaceholders(\Cx\Core\Core\Controller\type $objTemplate)
todo | Does this even make any sense? Couldn't simply everything be set after content parsing? |
---|---|
todo | Remove usage of globals |
global | type $themesPages |
global | type $page_template |
global | array $_CONFIG |
\Cx\Core\Core\Controller\type
startTimer()
stopTimer() : int
int
Time needed to parse page in secondstryToSetMemoryLimit()
$customizingPath : string
$db : \Cx\Core\Model\Db
$eventManager : \Cx\Core\Event\Controller\EventManager
$instances : array
The first one is the normally used one, all others are special.
$langId : int
$license : \Cx\Core_Modules\License\License
$mode : string
$request : \Cx\Core\Routing\Url
$resolvedPage : \Cx\Core\ContentManager\Model\Entity\Page
$resolver : \Cx\Core\Routing\Resolver
$startTime : array
$template : \Cx\Core\Html\Sigma
$toolbox : \FWSystem
todo | Update FWSystem |
---|
MODE_BACKEND
In this mode, Contrexx show the administrative backend
MODE_CLI
In this mode, Contrexx is initialized for commandline usage This mode is BETA at this time
MODE_FRONTEND
In this mode, Contrexx shows the frontend
MODE_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