/home
/deploy
/EHungry-2-joel
/PHP
/Global.php
'faxstatus' => 'faxstatus',
'files' => 'files',
'reportcspviolation' => 'reportcspviolation',
'status' => 'status',
'smscallback' => 'smscallback',
'updatehours' => 'updatehours',
'itsacheckmatecallback' => 'itsacheckmatecallback',
'itsacheckmatewebhook' => 'itsacheckmatewebhook',
'shipdaywebhook' => 'shipdaywebhook',
'supermenuwebhook' => 'supermenuwebhook',
'ivr' => 'ivr',
];
//stories are only accessible on dev servers
if (DevLevel >= 2) {
$controllers['stories'] = 'stories';
}
$path = parse_url($_SERVER['REQUEST_URI'], PHP_URL_PATH);
if (isPaymentDomain()) {
$controller = 'payments';
} elseif (isSpringroll()) {
if (strpos($_REQUEST['aid'], 'restaurant/') === 0) {
$_REQUEST['aid'] = substr($_REQUEST['aid'], strlen('restaurant/'));
} elseif (strpos($_REQUEST['aid'], 'account/') === 0) {
$controller = 'account';
} elseif (strpos($_REQUEST['aid'], 'phonecallback/') === 0) {
$controller = 'phonecallback';
} else {
$controller = 'marketplace';
}
} else if (preg_match('/\/account-settings\//', $path)) {
$controller = 'accountsettings';
} elseif (($path === '/auth' || preg_match('#/auth(/.*)?$#', $path)) && !str_starts_with($path, '/'.ManagerAPI::PREFIX)) {
$controller = 'auth';
} else if (preg_match('/\/checkout\//', $_SERVER['REQUEST_URI'])) {
$controller = 'checkout';
}
if (!$controller) {
Arguments
"Call to undefined function isPaymentDomain()"
/home
/deploy
/EHungry-2-joel
/Web
/index.php
<? /** @noinspection PhpIncludeInspection - to avoid marking dynamic includes */
//TODO create a «root»/_bootstrap.php which can be used by .psysh.php, tests/bootstrap.php and Web/index.php
require(dirname(__DIR__).'/PHP/base_consts.php');
require(dirname(__DIR__).'/PHP/autoloader.php');
initializeAutoLoader();
//disabled for now since we already have our own Alerts infrastructure, and it's not worth it to append another cloud provider to the startup of every freaking request; it's also not possible to catch errors this early if we depend on database checks, but we'll leave it here in case we change our mind?
//ErrorHandlers::sentryInit(); //early catch of errors and failsafe for smaller controllers, not in Sentry
App::startTime();
ErrorHandlers::register();
// Global.php is the core setup file for the application
App::debugbarTime('Global.php');
require(dirname(__DIR__) . '/PHP/Global.php');
App::debugbarTime('Global.php');
/** @var string $controller The main controller - defined at /PHP/Global.php */
App::debugbarTime('Sentry - controller');
ErrorHandlers::sentryInit($controller); //doesn't always do much - not every controller has a Sentry project
App::debugbarTime('Sentry - controller');
App::debugbarTime("controller: $controller");
apache_note('AppController', $controller);
if (file_exists(CORE_PATH."lib/helpers/$controller.php")) {
require CORE_PATH."lib/helpers/$controller.php";
}
require CORE_PATH."controllers/$controller.php";
App::debugbarTime("controller: $controller");