OXID eShop CE  4.10.7
 All Classes Namespaces Files Functions Variables Pages
oxShopControl Class Reference
+ Inheritance diagram for oxShopControl:
+ Collaboration diagram for oxShopControl:

Public Member Functions

 start ($sClass=null, $sFunction=null, $aParams=null, $aViewsChain=null)
 getTotalTime ()
- Public Member Functions inherited from oxSuperCfg
 __call ($sMethod, $aArgs)
 __construct ()
 getConfig ()
 setConfig ($oConfig)
 getSession ()
 setSession ($oSession)
 getUser ()
 setUser ($oUser)
 isAdmin ()
 setAdminMode ($blAdmin)

Protected Member Functions

 _setDefaultExceptionHandler ()
 _log ($sClass, $sFnc)
 _startMonitor ()
 _stopMonitor ($blIsCache=false, $blIsCached=false, $sViewID=null, $aViewData=array())
 _executeMaintenanceTasks ()
 _process ($sClass, $sFunction, $aParams=null, $aViewsChain=null)
 _initializeViewObject ($sClass, $sFunction, $aParams=null, $aViewsChain=null)
 _canExecuteFunction ($oClass, $sFunction)
 _getFormattedErrors ($sControllerName)
 _render ($oViewObject)
 _getOutputManager ()
 _getErrors ($sCurrentControllerName)
 _runOnce ()
 _getErrorReportingLevel ()
 _isDebugMode ()
 _handleSystemException ($oEx)
 _handleCookieException ($oEx)
 _handleAccessRightsException ($oEx)
 _handleDbConnectionException ($oEx)
 _handleBaseException ($oEx)
 _getStartController ()
 _getFrontendStartController ()
 _getFrontendMallStartController ()

Protected Attributes

 $_blHandlerSet = null
 $_blMainTasksExecuted = null
 $_dTimeStart = null
 $_dTimeEnd = null
 $_aErrors = null
 $_aAllErrors = null
 $_aControllerErrors = null
 $_oOutput = null
 $_oCache = null

Additional Inherited Members

- Static Protected Attributes inherited from oxSuperCfg
static $_oConfig = null
static $_oSession = null
static $_oRights = null
static $_oActUser = null
static $_blIsAdmin = null

Detailed Description

Main shop actions controller. Processes user actions, logs them (if needed), controlls output, redirects according to processed methods logic. This class is initalized from index.php

Definition at line 8 of file oxshopcontrol.php.

Member Function Documentation

oxShopControl::_canExecuteFunction (   $oClass,
  $sFunction 
)
protected

Check if method can be executed.

Parameters
object$oClassobject to check if its method can be executed.
string$sFunctionmethod to check if it can be executed.
Returns
bool

Definition at line 411 of file oxshopcontrol.php.

oxShopControl::_executeMaintenanceTasks ( )
protected

Executes regular maintenance functions..

Returns
null

Definition at line 278 of file oxshopcontrol.php.

oxShopControl::_getErrorReportingLevel ( )
protected

Returns error reporting level. Returns disabled error logging if server is misconfigured #2015 E_NONE replaced with 0.

Returns
int

Definition at line 591 of file oxshopcontrol.php.

oxShopControl::_getErrors (   $sCurrentControllerName)
protected

return page errors array

Parameters
string$sCurrentControllerNamea class name
Returns
array

Definition at line 528 of file oxshopcontrol.php.

oxShopControl::_getFormattedErrors (   $sControllerName)
protected

format error messages from _getErrors and return as array

Parameters
string$sControllerNamea class name
Returns
array

Definition at line 433 of file oxshopcontrol.php.

oxShopControl::_getFrontendMallStartController ( )
protected

Returns start controller class name for frontend mall. If no class specified, we need to change back to base shop

Returns
string

Definition at line 737 of file oxshopcontrol.php.

oxShopControl::_getFrontendStartController ( )
protected

Returns which controller should be loaded at shop start. Check whether we have to display mall start screen or not.

Returns
string

Definition at line 721 of file oxshopcontrol.php.

oxShopControl::_getOutputManager ( )
protected

return output handler

Returns
oxOutput

Definition at line 512 of file oxshopcontrol.php.

oxShopControl::_getStartController ( )
protected

Returns controller class which should be loaded.

Returns
string

Definition at line 703 of file oxshopcontrol.php.

oxShopControl::_handleAccessRightsException (   $oEx)
protected

R&R handling -> redirect to error msg, also, can call _process again, specifying error handler view class.

Parameters
oxException$oExException

Definition at line 661 of file oxshopcontrol.php.

oxShopControl::_handleBaseException (   $oEx)
protected

Catching other not caught exceptions.

Parameters
oxException$oEx

Definition at line 688 of file oxshopcontrol.php.

oxShopControl::_handleCookieException (   $oEx)
protected

Redirect to start page, in debug mode shows error message.

Parameters
oxException$oExException

Definition at line 648 of file oxshopcontrol.php.

oxShopControl::_handleDbConnectionException (   $oEx)
protected

Shows exception message if debug mode is enabled, redirects otherwise.

Parameters
oxConnectionException$oExmessage to show on exit
Deprecated:
since v5.3.5 (2017-10-04). Exception handling will change in v6.0.

Definition at line 673 of file oxshopcontrol.php.

oxShopControl::_handleSystemException (   $oEx)
protected

Shows exceptionError page. possible reason: class does not exist etc. –> just redirect to start page.

Parameters
oxException$oEx

Definition at line 631 of file oxshopcontrol.php.

oxShopControl::_initializeViewObject (   $sClass,
  $sFunction,
  $aParams = null,
  $aViewsChain = null 
)
protected

initialize and return view object

Parameters
string$sClassview name
string$sFunctionfunction name
array$aParamsparameters array
array$aViewsChainarray of views names that should be initialized also
Returns
oxView

Reimplemented in oxWidgetControl.

Definition at line 382 of file oxshopcontrol.php.

oxShopControl::_isDebugMode ( )
protected

Checks if shop is in debug mode

Returns
bool

Definition at line 614 of file oxshopcontrol.php.

oxShopControl::_log (   $sClass,
  $sFnc 
)
protected

Logs user performed actions to DB. Skips action logging if it's search engine.

Parameters
string$sClassName of class
string$sFncName of executed class method
Deprecated:
since 5.3.0 (2016.04.07); It will be moved to statistics_module module.

Definition at line 147 of file oxshopcontrol.php.

oxShopControl::_process (   $sClass,
  $sFunction,
  $aParams = null,
  $aViewsChain = null 
)
protected

Initiates object (object::init()), executes passed function (oxShopControl::executeFunction(), if method returns some string - will redirect page and will call another function according to returned parameters), renders object (object::render()). Performs output processing oxOutput::ProcessViewArray(). Passes template variables to template engine witch generates output. Output is additionally processed (oxOutput::Process()), fixed links according search engines optimization rules (configurable in Admin area). Finally echoes the output.

Parameters
string$sClassName of class
string$sFunctionName of function
array$aParamsParameters array
array$aViewsChainArray of views names that should be initialized also

Definition at line 304 of file oxshopcontrol.php.

oxShopControl::_render (   $oViewObject)
protected

render oxView object

Parameters
oxView$oViewObjectview object to render
Returns
string

Definition at line 456 of file oxshopcontrol.php.

oxShopControl::_runOnce ( )
protected

This function is only executed one time here we perform checks if we only need once per session

Returns
null

Reimplemented in oxWidgetControl.

Definition at line 561 of file oxshopcontrol.php.

oxShopControl::_setDefaultExceptionHandler ( )
protected

Sets default exception handler. Ideally all exceptions should be handled with try catch and default exception should never be reached.

Deprecated:
since v5.3.5 (2017-10-04). Exception handling will change in v6.0. You will be able set your own default exception handler in modules/functions.php in v6.0.
Returns
null;

Definition at line 129 of file oxshopcontrol.php.

oxShopControl::_startMonitor ( )
protected

Starts resource monitor

Definition at line 183 of file oxshopcontrol.php.

oxShopControl::_stopMonitor (   $blIsCache = false,
  $blIsCached = false,
  $sViewID = null,
  $aViewData = array() 
)
protected

Stops resource monitor, summarizes and outputs values

Parameters
bool$blIsCacheIs content cache
bool$blIsCachedIs content cached
bool$sViewIDView ID
array$aViewDataView data

Definition at line 198 of file oxshopcontrol.php.

oxShopControl::getTotalTime ( )

Returns the difference between stored profiler end time and start time. Works only after _stopMonitor() is called, otherwise returns 0.

Returns
double

Definition at line 264 of file oxshopcontrol.php.

oxShopControl::start (   $sClass = null,
  $sFunction = null,
  $aParams = null,
  $aViewsChain = null 
)

Main shop manager, that sets shop status, executes configuration methods. Executes oxShopControl::_runOnce(), if needed sets default class (according to admin or regular activities). Additionally its possible to pass class name, function name and parameters array to view, which will be executed.

Parameters
string$sClassClass name
string$sFunctionFunction name
array$aParamsParameters array
array$aViewsChainArray of views names that should be initialized also

Reimplemented in oxWidgetControl.

Definition at line 95 of file oxshopcontrol.php.

Member Data Documentation

oxShopControl::$_aAllErrors = null
protected

Definition at line 56 of file oxshopcontrol.php.

oxShopControl::$_aControllerErrors = null
protected

Definition at line 65 of file oxshopcontrol.php.

oxShopControl::$_aErrors = null
protected

Definition at line 47 of file oxshopcontrol.php.

oxShopControl::$_blHandlerSet = null
protected

Definition at line 17 of file oxshopcontrol.php.

oxShopControl::$_blMainTasksExecuted = null
protected

Definition at line 24 of file oxshopcontrol.php.

oxShopControl::$_dTimeEnd = null
protected

Definition at line 38 of file oxshopcontrol.php.

oxShopControl::$_dTimeStart = null
protected

Definition at line 31 of file oxshopcontrol.php.

oxShopControl::$_oCache = null
protected

Definition at line 82 of file oxshopcontrol.php.

oxShopControl::$_oOutput = null
protected

Definition at line 75 of file oxshopcontrol.php.


The documentation for this class was generated from the following file: