OXID eShop CE  6.0.2
bootstrap.php File Reference

Classes

class  BootstrapConfigFileReader
 

Functions

 oxTriggerOfflinePageDisplay ()
 
 writeToLog ($message)
 

Variables

const INSTALLATION_ROOT_PATH dirname(__DIR__)
 
const OX_BASE_PATH INSTALLATION_ROOT_PATH . DIRECTORY_SEPARATOR . 'source' . DIRECTORY_SEPARATOR
 
const OX_LOG_FILE OX_BASE_PATH . 'log' . DIRECTORY_SEPARATOR . 'EXCEPTION_LOG.txt'
 
const OX_OFFLINE_FILE OX_BASE_PATH . 'offline.html'
 
const VENDOR_PATH INSTALLATION_ROOT_PATH . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR
 
if(!is_dir(OX_BASE_PATH . 'Core')) else
 
 $configMissing = !is_readable(OX_BASE_PATH . "config.inc.php")
 
if($configMissing||!is_readable(VENDOR_PATH . 'autoload.php')) $bootstrapConfigFileReader = new \BootstrapConfigFileReader()
 
 if ( $bootstrapConfigFileReader->isDebugMode())
 
 $configFile = new \OxidEsales\Eshop\Core\ConfigFile(OX_BASE_PATH . "config.inc.php")
 
 $debugMode = (bool) \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\ConfigFile::class)->getVar('iDebug')
 

Function Documentation

◆ oxTriggerOfflinePageDisplay()

oxTriggerOfflinePageDisplay ( )

Bulletproof offline page loader

◆ writeToLog()

writeToLog (   $message)
Parameters
string$message

Variable Documentation

◆ $bootstrapConfigFileReader

if ( $configMissing||!is_readable(VENDOR_PATH . 'autoload.php')) $bootstrapConfigFileReader = new \BootstrapConfigFileReader()

Turn on display errors for debug mode

◆ $configFile

$configFile = new \OxidEsales\Eshop\Core\ConfigFile(OX_BASE_PATH . "config.inc.php")

Store the shop configuration in the Registry prior including the custom bootstrap functionality. Like this the shop configuration is available there.

◆ $configMissing

$configMissing = !is_readable(OX_BASE_PATH . "config.inc.php")

Ensure shop config and autoload files are available.

◆ $debugMode

$debugMode = (bool) \OxidEsales\Eshop\Core\Registry::get(\OxidEsales\Eshop\Core\ConfigFile::class)->getVar('iDebug')

Set exception handler before including modules/functions.php so it can be overwritten easiliy by shop operators.

◆ else

if (!is_dir(OX_BASE_PATH . 'Core')) else
Initial value:
{
define('CORE_AUTOLOADER_PATH', OX_BASE_PATH . 'Core' . DIRECTORY_SEPARATOR . 'Autoload' . DIRECTORY_SEPARATOR)
const OX_BASE_PATH
Definition: bootstrap.php:11

Where CORE_AUTOLOADER_PATH points depends on how OXID eShop has been installed. If it is installed as part of a compilation, the directory 'Core', where the auto load classes are located, does not reside inside OX_BASE_PATH, but inside VENDOR_PATH.

◆ if

if(is_readable(OX_BASE_PATH . 'modules/functions.php'))

Register basic the autoloaders. In this phase we still do not want to use other shop classes to make autoloading as decoupled as possible.

Generic utility method file. The global object factory function oxNew is defined here.Custom bootstrap functionality.The functions defined conditionally in this file may have been overwritten in 'modules/functions.php', so their functionality may have changed completely.

◆ INSTALLATION_ROOT_PATH

const INSTALLATION_ROOT_PATH dirname(__DIR__)

◆ OX_BASE_PATH

const OX_BASE_PATH INSTALLATION_ROOT_PATH . DIRECTORY_SEPARATOR . 'source' . DIRECTORY_SEPARATOR

◆ OX_LOG_FILE

const OX_LOG_FILE OX_BASE_PATH . 'log' . DIRECTORY_SEPARATOR . 'EXCEPTION_LOG.txt'

◆ OX_OFFLINE_FILE

const OX_OFFLINE_FILE OX_BASE_PATH . 'offline.html'

◆ VENDOR_PATH

const VENDOR_PATH INSTALLATION_ROOT_PATH . DIRECTORY_SEPARATOR . 'vendor' . DIRECTORY_SEPARATOR