*
* @param Account $account
* @param bool $isCordovaApp
* @return int
*/
public static function resolveCustomerTemplateId($account, $isCordovaApp) {
if ($isCordovaApp) {
return static::isAppV4Enabled($account) ? static::DEFAULT_V4_ID : static::DEFAULT_ID;
}
return $account->template_id ?: static::DEFAULT_V4_ID;
}
/**
* Whether this account should use the V4 template in the Cordova ordering app.
*
* @param Account $account
* @return bool
*/
public static function isAppV4Enabled($account) {
return in_array(substr((string)$account->id, -1), ['0', '1', '2'75/(75_)]);
}
public function scopeWebsites($query) {
return $query->where('type', static::TYPE_WEBSITE);
}
/**
* Holds the limit for the amount of menu items the website template
* will render for a single category.
*
* @var int
*/
const WEBSITE_TEMPLATE_MENU_ITEM_LIST_LIMIT = 16;
public $timestamps = true;
public const UPDATED_AT = null;
public static function getAll($whereClause = '', $idOnly = true) {
$db_conn = DB::conn();
"syntax error, unexpected '75' (T_LNUMBER), expecting ']'"
*/
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
includeFile($file);
return true;
}
return null;
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|false The path if found, false otherwise
*/
public function findFile($class)
{
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
"/home/deploy/EHungry-2-joel/PHP/vendor/composer/../../../Web/classes/Template.class.php"
"Template"
if (isset($_REQUEST['_CORDOVA_APP'])) {
if ($_REQUEST['_CORDOVA_APP'] && !(strstr($account->getEnabledModules(), (string)APP_MODULE) || (is_object($global_reseller) && $global_reseller->getAppleAppId()))) {
unset($_REQUEST['_CORDOVA_APP']);
}
//for testing via browser, lets store phonegap flag in the session as well so we can force set it
if ($_REQUEST['_CORDOVA_APP']) {
$_SESSION['_CORDOVA_APP'] = true;
} elseif ($_REQUEST['_CORDOVA_APP'] === '0') {
$_SESSION['_CORDOVA_APP'] = false;
unset($_REQUEST['_CORDOVA_APP']);
}
}
if (isset($_SESSION['_CORDOVA_APP']) && $_SESSION['_CORDOVA_APP'] && strstr($account->getEnabledModules(), (string)APP_MODULE)) {
$_REQUEST['_CORDOVA_APP'] = true;
}
$template_id = Template::resolveCustomerTemplateId($account, isset($_REQUEST['_CORDOVA_APP']) && $_REQUEST['_CORDOVA_APP']);
$template = new Template($template_id);
$version = $template->version ?: 3;
if (!apache_note('AppVersion')) {
apache_note('AppVersion', $version);
}
$templateName = $template->getFolderName();
$_REQUEST['_VERSION'] = $version;
$showCart = false;
$_REQUEST['_TEMPLATE_SETTINGS'] = TemplateAccountSetting::getAllForAccountAndTemplate($account->getId(), $template->getId());
$currentOrderingPlatform = OrderTemplatePlatforms::currentOrderingPlatform(isSpringroll());
$activeCampaign = $account->activeCampaigns($currentOrderingPlatform)->first();
if ($activeCampaign && $activeCampaign->url_tag && $_REQUEST["form"] == $activeCampaign->url_tag) {
$_REQUEST["form"] = "campaign";
}
$status = isValidPage($_REQUEST["form"]);
//v4 pages that can can be accessed without logging in
"Template"
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");
"/home/deploy/EHungry-2-joel/Web/controllers/customer.php"
| Key | Value |
| aid | "restaurant/bestmealpatchogue/order/main/combination-plates/c1-white-meat-chicken-chow-mein"
|
| Key | Value |
| PHPSESSID | "qi8ds9lmguclt6q454dft0k6fd"
|
| Key | Value |
| loc | "en_US"
|
| customer_account_id | 38784
|
| cart | Cart {}
|
| restaurant_id | 8339
|
| menu_id | 10597
|
| Key | Value |
| UNIQUE_ID | "aZZKG1YOi4EglgDvukrSnAAAAAE"
|
| SCRIPT_URL | "/restaurant/bestmealpatchogue/order/main/combination-plates/c1-white-meat-chicken-chow-mein"
|
| SCRIPT_URI | "http://www.springroll.com.2.joel.ehungry.net/restaurant/bestmealpatchogue/order/main/combination-plates/c1-white-meat-chicken-chow-mein"
|
| HTTP_HOST | "www.springroll.com.2.joel.ehungry.net"
|
| HTTP_X_REAL_IP | "216.73.216.87"
|
| HTTP_X_CONFKEY | "Main_Domain:14844"
|
| HTTP_SCHEME | "https"
|
| HTTP_EHENV | "TODO"
|
| HTTP_CONNECTION | "close"
|
| HTTP_ACCEPT | "*/*"
|
| HTTP_USER_AGENT | "Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)"
|
| HTTP_ACCEPT_ENCODING | "gzip, br, zstd, deflate"
|
| HTTP_COOKIE | "PHPSESSID=qi8ds9lmguclt6q454dft0k6fd"
|
| PATH | "/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin"
|
| SERVER_SIGNATURE | "" |
| SERVER_SOFTWARE | "Apache/2.4.62 () mod_wsgi/4.6.5 Python/3.7 PHP/7.2.34"
|
| SERVER_NAME | "www.springroll.com.2.joel.ehungry.net"
|
| SERVER_ADDR | "127.0.0.1"
|
| SERVER_PORT | "80"
|
| REMOTE_ADDR | "216.73.216.87"
|
| DOCUMENT_ROOT | "/home/deploy/EHungry-2-joel/Web"
|
| REQUEST_SCHEME | "http"
|
| CONTEXT_PREFIX | "" |
| CONTEXT_DOCUMENT_ROOT | "/home/deploy/EHungry-2-joel/Web"
|
| SERVER_ADMIN | "root@localhost"
|
| SCRIPT_FILENAME | "/home/deploy/EHungry-2-joel/Web/index.php"
|
| REMOTE_PORT | "48368"
|
| GATEWAY_INTERFACE | "CGI/1.1"
|
| SERVER_PROTOCOL | "HTTP/1.0"
|
| REQUEST_METHOD | "GET"
|
| QUERY_STRING | "aid=restaurant/bestmealpatchogue/order/main/combination-plates/c1-white-meat-chicken-chow-mein"
|
| REQUEST_URI | "/restaurant/bestmealpatchogue/order/main/combination-plates/c1-white-meat-chicken-chow-mein"
|
| SCRIPT_NAME | "/restaurant/bestmealpatchogue/order/main/combination-plates/c1-white-meat-chicken-chow-mein"
|
| PHP_SELF | "/restaurant/bestmealpatchogue/order/main/combination-plates/c1-white-meat-chicken-chow-mein"
|
| REQUEST_TIME_FLOAT | 1771457051.506
|
| REQUEST_TIME | 1771457051
|