/home
/deploy
/EHungry-2-joel
/Web
/classes
/Template.class.php
*
* @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();
Arguments
"syntax error, unexpected '75' (T_LNUMBER), expecting ']'"
/home
/deploy
/EHungry-2-joel
/PHP
/vendor
/composer
/ClassLoader.php
*/
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];
}
Arguments
"/home/deploy/EHungry-2-joel/PHP/vendor/composer/../../../Web/classes/Template.class.php"
/home
/deploy
/EHungry-2-joel
/Web
/controllers
/customer.php
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
Arguments
/home
/deploy
/EHungry-2-joel
/Web
/index.php
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");
Arguments
"/home/deploy/EHungry-2-joel/Web/controllers/customer.php"