ParseError
syntax error, unexpected end of file ParseError thrown with message "syntax error, unexpected end of file" Stacktrace: #12 ParseError in /home/deploy/EHungry-8-simon/Web/classes/Restaurant.class.php:2336 #11 Composer\Autoload\includeFile in /home/deploy/EHungry-8-simon/PHP/vendor/composer/ClassLoader.php:428 #10 Composer\Autoload\ClassLoader:loadClass in [internal]:0 #9 spl_autoload_call in [internal]:0 #8 unserialize in /home/deploy/EHungry-8-simon/Web/classes/Cache.class.php:122 #7 Cache:GetType in /home/deploy/EHungry-8-simon/Web/classes/Cache.class.php:184 #6 Cache:RememberType in /home/deploy/EHungry-8-simon/Web/classes/Cache.class.php:235 #5 Cache:RememberArray in /home/deploy/EHungry-8-simon/Web/classes/Account.class.php:1388 #4 Account:getAllRestaurantsByAccountId in /home/deploy/EHungry-8-simon/Web/classes/Account.class.php:1398 #3 Account:getAllRestaurants in /home/deploy/EHungry-8-simon/Web/classes/Account.class.php:1355 #2 Account:getActiveRestaurants in /home/deploy/EHungry-8-simon/Web/classes/Account.class.php:2860 #1 Account:isOnSpringroll in /home/deploy/EHungry-8-simon/Web/controllers/customer.php:260 #0 require in /home/deploy/EHungry-8-simon/Web/index.php:30
Stack frames (13)
12
ParseError
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Restaurant.class.php
2336
11
Composer
\
Autoload
\
includeFile
/
vendor
/
composer
/
ClassLoader.php
428
10
Composer
\
Autoload
\
ClassLoader
loadClass
[internal]
0
9
spl_autoload_call
[internal]
0
8
unserialize
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cache.class.php
122
7
Cache
GetType
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cache.class.php
184
6
Cache
RememberType
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cache.class.php
235
5
Cache
RememberArray
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Account.class.php
1388
4
Account
getAllRestaurantsByAccountId
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Account.class.php
1398
3
Account
getAllRestaurants
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Account.class.php
1355
2
Account
getActiveRestaurants
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Account.class.php
2860
1
Account
isOnSpringroll
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
controllers
/
customer.php
260
0
require
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
index.php
30
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Restaurant.class.php
                if (empty($startEndArray[$i-1]['00:00']) && $prevclose < $prevopen) {
                    $startEndArray[$i-1]['00:00'] = $prevclose;
                    $prevDayClose = $prevclose;
                }
            }
        }

        //if there are holiday hours for this day - only return these hours
        $startEndInvalidArray = [];
        if (!$excludingClosedHours) {
            $holidayHours = HolidayHours::getByDateAndRestaurantAndType(date('Y-m-d 00:00:00', $dateTimestamp), $this->getId(), $cart->getBaseOrderType());
            if (is_object($holidayHours)) {
                $startTime     = date('H:i', strtotime($holidayHours->getStartHour()));
                $endTime       = date('H:i', strtotime($holidayHours->getEndHour().'-1 minute'));
                $startEndArray = [[$startTime => $endTime]];
            }

            //remove times from closed hours
            $closedHours = ClosedHours::getByDateAndRestaurantAndType($dateTimestamp, $this->getId(), $cart->getBaseOrderType());
            if (!is_object($holidayHours) && is_array($closedHours) && count($closedHours) > 0) {
                foreach ($closedHours as $h) {
                    $startTime              = date('H:i', strtotime($h->getStartTime()));
                    $endTime                = date('H:i', strtotime($h->getEndTime().'-1 minute'));
                    $startEndInvalidArray[] = [$startTime => $endTime];
                }
            }
        }

        //menu available times
        $prevDayMenusClose = '00:00';
        $prevDayMenusClosed = true;
        $menusHaveTimeRestrictions = false;
        $cartMenus = $cart->getMenus();
        if (!count($cartMenus) || $getTimesForAnyMenus) {
            $cartMenus = $this->getMenus(true);
            $getTimesForAnyMenus = true;
        }
        $menuStartTime = $getTimesForAnyMenus ? '23:59' : '00:00';
        $menuEndTime = $getTimesForAnyMenus ? '00:00' : '23:59';
Arguments
  1. "syntax error, unexpected end of file"
    
/
home
/
deploy
/
EHungry-8-simon
/
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
  1. "/home/deploy/EHungry-8-simon/PHP/vendor/composer/../../../Web/classes/Restaurant.class.php"
    
[internal]
Arguments
  1. "Restaurant"
    
[internal]
Arguments
  1. "Restaurant"
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cache.class.php
     * @return bool|array|null
     */
    public static function GetArray($key, $allowNull = false) {
        return static::GetType('array', $key, $allowNull);
    }
 
    /**
     * This one can either return a boolean when key is found, or a null if key isn't found. So you need to check the
     * result with with is_bool() or is_null().
     * @param string $key The key to lookup
     * @return bool|null
     */
    public static function GetBoolean($key) {
        return static::GetType('bool', $key, false, null);
    }
 
    private static function GetType($type, $key, $allowNull, $notFoundResult = false) {
        $r = static::Get($key);
        if ($r) {
            $uco = unserialize($r);
            $typeFunc = 'is_'.$type;
            if ($typeFunc($uco) || ($allowNull && is_null($uco))) {
                return $uco;
            }
        }
        return $notFoundResult;
    }
 
    public static function Get($key) {
        if (array_key_exists($key, static::$requestCache)) {
            $r = static::$requestCache[$key];
            $r = static::afterGet($r);
            App::cacheHit($key);
            return $r;
        }
 
        if ($i = static::getInstance()) {
            if ($r = $i->get($key)) {
                //if a key has been used more than 3 times, store it in the in-memory request cache.
                //We don't store every cache load in-memory, otherwise we might run out of memory on some pages (eg if they load every account)
Arguments
  1. "a:1:{i:0;O:10:"Restaurant":28:{s:10:"timestamps";b:1;s:12:"coupon_count";N;s:11:"\x00*\x00fillable";a:6:{i:0;s:5:"email";i:1;s:18:"notification_email";i:2;s:28:"pickup_ordering_closed_until";i:3;s:28:"dinein_ordering_closed_until";i:4;s:30:"delivery_ordering_closed_until";i:5;s:16:"is_on_springroll";}s:10:"\x00*\x00visible";a:14:{i:0;s:10:"allow_tips";i:1;s:18:"closed_until_texts";i:2;s:30:"delivery_ordering_closed_until";i:3;s:28:"dinein_ordering_closed_until";i:4;s:12:"display_name";i:5;s:24:"enabled_base_order_types";i:6;s:2:"id";i:7;s:9:"is_locked";i:8;s:28:"pickup_ordering_closed_until";i:9;s:8:"position";i:10;s:29:"shipday_auto_dispatch_enabled";i:11;s:34:"show_future_order_delivery_minutes";i:12;s:32:"show_future_order_pickup_minutes";i:13;s:11:"timezone_id";}s:10:"\x00*\x00appends";a:3:{i:0;s:11:"timezone_id";i:1;s:24:"enabled_base_order_types";i:2;s:18:"closed_until_texts";}s:8:"\x00*\x00casts";a:5:{s:9:"is_locked";s:7:"boolean";s:12:"has_delivery";s:7:"boolean";s:11:"has_dine_in";s:7:"boolean";s:10:"has_pickup";s:7:"boolean";s:18:"ordering_is_closed";s:7:"boolean";}s:8:"\x00*\x00dates";a:3:{i:0;s:28:"pickup_ordering_closed_until";i:1;s:28:"dinein_ordering_closed_until";i:2;s:30:"delivery_ordering_closed_until";}s:12:"pdfPageCount";i:0;s:9:"\x00*\x00hidden";a:1:{i:0;s:8:"password";}s:13:"\x00*\x00connection";s:7:"default";s:8:"\x00*\x00table";N;s:13:"\x00*\x00primaryKey";s:2:"id";s:10:"\x00*\x00keyType";s:3:"int";s:12:"incrementing";b:1;s:7:"\x00*\x00with";a:0:{}s:12:"\x00*\x00withCount";a:0:{}s:10:"\x00*\x00perPage";i:15;s:6:"exists";b:1;s:18:"wasRecentlyCreated";b:0;s:13:"\x00*\x00attributes";a:303:{s:2:"id";i:10509;s:10:"account_id";i:82986;s:11:"monday_open";s:8:"11:00:00";s:12:"tuesday_open";s:8:"11:00:00";s:14:"wednesday_open";s:8:"11:00:00";s:13:"thursday_open";s:8:"11:00:00";s:11:"friday_open";s:8:"11:00:00";s:13:"saturday_open";s:8:"11:00:00";s:11:"sunday_open";s:8:"12:00:00";s:13:"monday_closed";s:8:"22:30:00";s:14:"tuesday_closed";s:8:"22:30:00";s:16:"wednesday_closed";s:8:"22:30:00";s:15:"thursday_closed";s:8:"22:30:00";s:13:"friday_closed";s:8:"23:30:00";s:15:"saturday_closed";s:8:"23:30:00";s:13:"sunday_closed";s:8:"22:30:00";s:13:"monday_open_2";s:8:"11:00:00";s:14:"tuesday_open_2";s:8:"11:00:00";s:16:"wednesday_open_2";s:8:"11:00:00";s:15:"thursday_open_2";s:8:"11:00:00";s:13:"friday_open_2";s:8:"11:00:00";s:15:"saturday_open_2";s:8:"11:00:00";s:13:"sunday_open_2";s:8:"12:00:00";s:15:"monday_closed_2";s:8:"22:30:00";s:16:"tuesday_closed_2";s:8:"22:30:00";s:18:"wednesday_closed_2";s:8:"22:30:00";s:17:"thursday_closed_2";s:8:"22:30:00";s:15:"friday_closed_2";s:8:"23:30:00";s:17:"saturday_closed_2";s:8:"23:30:00";s:15:"sunday_closed_2";s:8:"22:30:00";s:20:"delivery_monday_open";s:8:"11:00:00";s:21:"delivery_tuesday_open";s:8:"11:00:00";s:23:"delivery_wednesday_open";s:8:"11:00:00";s:22:"delivery_thursday_open";s:8:"11:00:00";s:20:"delivery_friday_open";s:8:"11:00:00";s:22:"delivery_saturday_open";s:8:"11:00:00";s:20:"delivery_sunday_open";s:8:"12:00:00";s:22:"delivery_monday_closed";s:8:"22:30:00";s:23:"delivery_tuesday_closed";s:8:"22:30:00";s:25:"delivery_wednesday_closed";s:8:"22:30:00";s:24:"delivery_thursday_closed";s:8:"22:30:00";s:22:"delivery_friday_closed";s:8:"23:30:00";s:24:"delivery_saturday_closed";s:8:"23:30:00";s:22:"delivery_sunday_closed";s:8:"22:30:00";s:22:"delivery_monday_open_2";s:8:"11:00:00";s:23:"delivery_tuesday_open_2";s:8:"11:00:00";s:25:"delivery_wednesday_open_2";s:8:"11:00:00";s:24:"delivery_thursday_open_2";s:8:"11:00:00";s:22:"delivery_friday_open_2";s:8:"11:00:00";s:24:"delivery_saturday_open_2";s:8:"11:00:00";s:22:"delivery_sunday_open_2";s:8:"12:00:00";s:24:"delivery_monday_closed_2";s:8:"22:30:00";s:25:"delivery_tuesday_closed_2";s:8:"22:30:00";s:27:"delivery_wednesday_closed_2";s:8:"22:30:00";s:26:"delivery_thursday_closed_2";s:8:"22:30:00";s:24:"delivery_friday_closed_2";s:8:"23:30:00";s:26:"delivery_saturday_closed_2";s:8:"23:30:00";s:24:"delivery_sunday_closed_2";s:8:"22:30:00";s:13:"two_hour_sets";i:0;s:23:"separate_delivery_hours";i:0;s:8:"timezone";i:1;s:10:"tax_rate_2";d:0;s:8:"tax_rate";d:8;s:16:"tax_rate_label_2";s:0:"";s:14:"tax_rate_label";s:0:"";s:19:"is_tax_2_cumulative";i:0;s:12:"has_delivery";i:1;s:11:"has_dine_in";i:0;s:10:"has_pickup";i:1;s:10:"allow_tips";i:1;s:19:"show_tip_calculator";i:1;s:16:"closed_on_monday";i:0;s:17:"closed_on_tuesday";i:0;s:19:"closed_on_wednesday";i:0;s:18:"closed_on_thursday";i:0;s:16:"closed_on_friday";i:0;s:18:"closed_on_saturday";i:0;s:16:"closed_on_sunday";i:0;s:25:"delivery_closed_on_monday";i:0;s:26:"delivery_closed_on_tuesday";i:0;s:28:"delivery_closed_on_wednesday";i:0;s:27:"delivery_closed_on_thursday";i:0;s:25:"delivery_closed_on_friday";i:0;s:27:"delivery_closed_on_saturday";i:0;s:25:"delivery_closed_on_sunday";i:0;s:16:"order_delay_type";i:2;s:18:"delay_under_amount";i:5000;s:16:"amount_per_delay";i:0;s:18:"delay_time_minutes";i:0;s:13:"pay_at_pickup";i:0;s:22:"pay_with_house_account";i:0;s:15:"pay_with_credit";i:2;s:23:"send_orders_immediately";i:1;s:12:"display_name";s:22:"Lee Lin Chinese - Troy";s:23:"inherited_restaurant_id";i:0;s:9:"is_locked";i:0;s:10:"created_on";s:19:"2013-03-19 08:56:14";s:11:"modified_at";s:19:"2024-10-17 14:11:42";s:7:"street1";s:15:"539 Pawling Ave";s:7:"street2";s:0:"";s:4:"city";s:4:"Troy";s:5:"state";s:2:"NY";s:3:"zip";s:5:"12180";s:5:"suite";s:0:"";s:13:"primary_phone";s:14:"(518) 274-8816";s:12:"second_phone";s:0:"";s:11:"primary_fax";s:14:"(518) 274-8817";s:5:"email";s:26:"info@chinesemenuonline.com";s:18:"notification_email";s:0:"";s:14:"accepted_cards";s:23:"CASH|VISA|MC|DISC|AMEX|";s:18:"ordering_is_closed";i:0;s:28:"public_ordering_closed_until";s:19:"0000-00-00 00:00:00";s:19:"delay_under_minutes";i:25;s:18:"delay_over_minutes";i:30;s:25:"delivery_order_delay_type";i:2;s:27:"delivery_delay_under_amount";i:10000;s:25:"delivery_amount_per_delay";i:0;s:27:"delivery_delay_time_minutes";i:0;s:28:"delivery_delay_under_minutes";i:55;s:27:"delivery_delay_over_minutes";i:60;s:16:"delivery_minimum";i:1500;s:13:"order_minimum";i:0;s:18:"order_minimum_card";i:0;s:21:"order_sending_methods";i:34;s:18:"order_sending_type";i:3;s:14:"sms_is_enabled";i:0;s:17:"sms_require_click";i:0;s:23:"sms_click_failure_retry";i:0;s:23:"sms_click_failure_phone";i:0;s:18:"phone_notification";i:1;s:25:"phone_notification_number";s:14:"(518) 274-8816";s:27:"phone_notification_throttle";i:0;s:10:"is_deleted";i:0;s:15:"delivery_charge";d:0;s:20:"delivery_charge_type";i:1;s:23:"minimum_delivery_charge";i:0;s:13:"mobile_number";s:0:"";s:8:"latitude";d:42.7059187;s:9:"longitude";d:-73.6593171;s:15:"manual_position";i:0;s:13:"pdf_menu_file";i:0;s:19:"checkout_return_url";s:0:"";s:16:"show_pickup_time";i:1;s:14:"pickup_message";s:0:"";s:16:"delivery_message";s:0:"";s:14:"dinein_message";s:0:"";s:29:"additional_order_time_message";s:0:"";s:29:"select_menu_from_current_time";i:0;s:23:"pizza_option_percentage";d:0.5;s:10:"custom_url";s:0:"";s:18:"delivery_zip_codes";s:0:"";s:15:"delivery_radius";d:5;s:32:"encoded_delivery_radius_polyline";s:108:"eW1fZEd8YXJgTWJ6QX1zRHByQl97RnhiRnNjQGZoRHtHYndBaH5DaFl4ak5iQmBuQGFfRWRlRH16QmBtQnt0RmFqQGF8QmlhRmthQHNhRg==";s:9:"url_alias";s:21:"lee_lin_chinese__troy";s:34:"remote_web_service_notification_id";i:0;s:18:"external_vendor_id";i:0;s:15:"has_no_ordering";i:0;s:12:"option_label";s:0:"";s:13:"topping_label";s:0:"";s:11:"extra_label";s:0:"";s:18:"option_description";s:0:"";s:17:"extra_description";s:0:"";s:19:"topping_description";s:0:"";s:24:"instructions_description";s:64:"NOTE EXTRA CHARGES MAY BE INCURRED FOR ADDITIONS IN THIS SECTION";s:19:"per_order_surcharge";d:0;s:24:"per_order_surcharge_type";i:2;s:24:"per_order_surcharge_name";s:0:"";s:30:"per_order_surcharge_order_type";s:0:"";s:26:"voice_notification_message";s:121:"You have received a new online order. The customer's name is {CUSTOMER_NAME} and their phone number is {CUSTOMER_NUMBER}.";s:22:"require_phone_keypress";i:1;s:18:"phone_wait_minutes";i:3;s:16:"phone_call_tries";i:3;s:11:"amd_enabled";i:0;s:21:"sms_upon_call_failure";i:0;s:17:"is_directory_only";i:0;s:15:"hide_all_prices";i:0;s:32:"custom_pickup_order_confirmation";s:0:"";s:34:"custom_delivery_order_confirmation";s:0:"";s:23:"custom_rejection_markup";s:0:"";s:25:"custom_order_time_snippet";s:0:"";s:23:"disallow_multiple_menus";i:0;s:27:"permit_time_error_overrides";i:0;s:12:"freepos_tax1";d:0;s:12:"freepos_tax2";d:0;s:12:"freepos_tax3";d:0;s:23:"payment_processor_txkey";s:0:"";s:25:"payment_processor_loginid";s:0:"";s:28:"payment_processor_public_key";s:0:"";s:10:"dress_code";s:0:"";s:7:"parking";s:0:"";s:13:"entertainment";s:0:"";s:21:"custom_credit_message";s:0:"";s:28:"custom_delivery_zone_message";s:0:"";s:21:"has_store_hour_ranges";i:0;s:21:"has_no_default_prices";i:0;s:28:"custom_time_rejection_markup";s:0:"";s:16:"max_advance_days";i:7;s:30:"group_order_delivery_lead_time";i:0;s:28:"group_order_pickup_lead_time";i:0;s:14:"hide_asap_time";i:0;s:31:"alternate_delivery_destinations";s:0:"";s:16:"has_group_orders";i:0;s:20:"default_payment_type";i:0;s:18:"default_order_type";s:0:"";s:8:"is_store";i:0;s:25:"require_prep_time_opening";i:1;s:16:"price_sort_order";s:0:"";s:32:"permit_admin_time_error_override";i:0;s:17:"delivery_map_file";s:0:"";s:26:"delivery_charge_is_taxable";i:0;s:29:"delivery_allowed_till_closing";i:0;s:12:"cvv_required";i:1;s:24:"billing_address_required";i:0;s:18:"use_driving_radius";i:1;s:25:"show_future_order_minutes";i:90;s:17:"no_cc_at_delivery";i:1;s:23:"send_end_of_day_summary";i:0;s:6:"cc_fee";s:1:"0";s:16:"asap_orders_only";i:0;s:12:"asap_no_time";i:0;s:17:"delivery_fee_name";s:0:"";s:22:"additional_fee_taxable";i:0;s:7:"url_tag";s:20:"lee-lin-chinese-troy";s:8:"position";i:0;s:34:"label_instead_special_instructions";s:0:"";s:12:"cuisine_type";s:7:"Chinese";s:20:"same_day_orders_only";i:0;s:18:"hours_text_enabled";i:0;s:10:"hours_text";s:0:"";s:14:"hours_text_url";s:0:"";s:17:"order_button_text";s:0:"";s:25:"hide_special_instructions";i:0;s:29:"special_instructions_required";i:0;s:28:"special_instructions_details";s:0:"";s:23:"throttle_period_minutes";i:0;s:13:"throttle_rate";i:0;s:22:"delivery_throttle_rate";i:0;s:34:"show_future_order_delivery_minutes";i:90;s:32:"show_future_order_pickup_minutes";i:90;s:22:"default_tip_percentage";i:0;s:22:"combined_throttle_rate";i:0;s:22:"prep_time_message_type";s:7:"DEFAULT";s:24:"prep_time_message_pickup";s:0:"";s:26:"prep_time_message_delivery";s:0:"";s:24:"prep_time_message_dinein";s:0:"";s:30:"coupon_global_terms_conditions";s:0:"";s:19:"allow_tip_at_pickup";i:0;s:11:"default_tip";s:0:"";s:12:"allow_no_tip";i:0;s:25:"hide_0_tip_on_order_sheet";i:0;s:15:"pay_with_paypal";i:0;s:15:"cc_fee_includes";s:0:"";s:10:"image_file";s:0:"";s:21:"show_cutlery_checkbox";i:0;s:22:"cutlery_checkbox_label";s:0:"";s:21:"show_napkins_checkbox";i:0;s:22:"napkins_checkbox_label";s:0:"";s:33:"items_special_instructions_length";i:0;s:16:"bag_fees_enabled";i:0;s:18:"is_bag_fee_taxable";i:0;s:20:"bags_formula_enabled";i:0;s:28:"bags_formula_count_per_price";i:0;s:18:"bags_formula_price";i:0;s:21:"hold_calls_until_open";i:1;s:25:"min_online_payment_amount";i:0;s:18:"time_slots_enabled";i:0;s:15:"time_slots_view";i:0;s:32:"time_slots_delivery_orders_limit";i:0;s:30:"time_slots_pickup_orders_limit";i:0;s:32:"time_slots_combined_orders_limit";i:0;s:25:"custom_time_slots_enabled";i:0;s:6:"pos_id";s:0:"";s:12:"pos_password";s:0:"";s:11:"cc_fee_name";s:0:"";s:28:"order_status_webhook_enabled";i:0;s:24:"order_status_webhook_url";s:0:"";s:22:"supermenu_sync_enabled";i:0;s:16:"tip_display_name";s:0:"";s:21:"tip_highlight_enabled";i:0;s:28:"pickup_ordering_closed_until";N;s:30:"delivery_ordering_closed_until";N;s:28:"dinein_ordering_closed_until";N;s:17:"delivery_tax_code";s:0:"";s:23:"additional_fee_tax_code";s:0:"";s:26:"third_party_restaurant_fee";i:0;s:24:"third_party_customer_fee";i:0;s:25:"checkout_message_location";i:0;s:16:"checkout_message";s:0:"";s:29:"shipday_auto_dispatch_enabled";i:0;s:31:"third_party_delivery_radius_min";s:4:"0.00";s:31:"third_party_delivery_radius_max";s:4:"0.00";s:36:"third_party_optimal_delivery_enabled";i:0;s:17:"hide_driver_notes";i:0;s:19:"driver_notes_length";i:0;s:35:"third_party_delivery_radius_enabled";i:0;s:14:"is_best_seller";i:0;s:14:"rating_average";s:4:"0.00";s:12:"rating_count";i:0;s:15:"price_range_min";i:0;s:15:"price_range_max";i:0;s:16:"is_on_springroll";i:1;s:13:"google_rating";s:4:"3.50";s:18:"google_price_level";i:1;}s:11:"\x00*\x00original";a:303:{s:2:"id";i:10509;s:10:"account_id";i:82986;s:11:"monday_open";s:8:"11:00:00";s:12:"tuesday_open";s:8:"11:00:00";s:14:"wednesday_open";s:8:"11:00:00";s:13:"thursday_open";s:8:"11:00:00";s:11:"friday_open";s:8:"11:00:00";s:13:"saturday_open";s:8:"11:00:00";s:11:"sunday_open";s:8:"12:00:00";s:13:"monday_closed";s:8:"22:30:00";s:14:"tuesday_closed";s:8:"22:30:00";s:16:"wednesday_closed";s:8:"22:30:00";s:15:"thursday_closed";s:8:"22:30:00";s:13:"friday_closed";s:8:"23:30:00";s:15:"saturday_closed";s:8:"23:30:00";s:13:"sunday_closed";s:8:"22:30:00";s:13:"monday_open_2";s:8:"11:00:00";s:14:"tuesday_open_2";s:8:"11:00:00";s:16:"wednesday_open_2";s:8:"11:00:00";s:15:"thursday_open_2";s:8:"11:00:00";s:13:"friday_open_2";s:8:"11:00:00";s:15:"saturday_open_2";s:8:"11:00:00";s:13:"sunday_open_2";s:8:"12:00:00";s:15:"monday_closed_2";s:8:"22:30:00";s:16:"tuesday_closed_2";s:8:"22:30:00";s:18:"wednesday_closed_2";s:8:"22:30:00";s:17:"thursday_closed_2";s:8:"22:30:00";s:15:"friday_closed_2";s:8:"23:30:00";s:17:"saturday_closed_2";s:8:"23:30:00";s:15:"sunday_closed_2";s:8:"22:30:00";s:20:"delivery_monday_open";s:8:"11:00:00";s:21:"delivery_tuesday_open";s:8:"11:00:00";s:23:"delivery_wednesday_open";s:8:"11:00:00";s:22:"delivery_thursday_open";s:8:"11:00:00";s:20:"delivery_friday_open";s:8:"11:00:00";s:22:"delivery_saturday_open";s:8:"11:00:00";s:20:"delivery_sunday_open";s:8:"12:00:00";s:22:"delivery_monday_closed";s:8:"22:30:00";s:23:"delivery_tuesday_closed";s:8:"22:30:00";s:25:"delivery_wednesday_closed";s:8:"22:30:00";s:24:"delivery_thursday_closed";s:8:"22:30:00";s:22:"delivery_friday_closed";s:8:"23:30:00";s:24:"delivery_saturday_closed";s:8:"23:30:00";s:22:"delivery_sunday_closed";s:8:"22:30:00";s:22:"delivery_monday_open_2";s:8:"11:00:00";s:23:"delivery_tuesday_open_2";s:8:"11:00:00";s:25:"delivery_wednesday_open_2";s:8:"11:00:00";s:24:"delivery_thursday_open_2";s:8:"11:00:00";s:22:"delivery_friday_open_2";s:8:"11:00:00";s:24:"delivery_saturday_open_2";s:8:"11:00:00";s:22:"delivery_sunday_open_2";s:8:"12:00:00";s:24:"delivery_monday_closed_2";s:8:"22:30:00";s:25:"delivery_tuesday_closed_2";s:8:"22:30:00";s:27:"delivery_wednesday_closed_2";s:8:"22:30:00";s:26:"delivery_thursday_closed_2";s:8:"22:30:00";s:24:"delivery_friday_closed_2";s:8:"23:30:00";s:26:"delivery_saturday_closed_2";s:8:"23:30:00";s:24:"delivery_sunday_closed_2";s:8:"22:30:00";s:13:"two_hour_sets";i:0;s:23:"separate_delivery_hours";i:0;s:8:"timezone";i:1;s:10:"tax_rate_2";d:0;s:8:"tax_rate";d:8;s:16:"tax_rate_label_2";s:0:"";s:14:"tax_rate_label";s:0:"";s:19:"is_tax_2_cumulative";i:0;s:12:"has_delivery";i:1;s:11:"has_dine_in";i:0;s:10:"has_pickup";i:1;s:10:"allow_tips";i:1;s:19:"show_tip_calculator";i:1;s:16:"closed_on_monday";i:0;s:17:"closed_on_tuesday";i:0;s:19:"closed_on_wednesday";i:0;s:18:"closed_on_thursday";i:0;s:16:"closed_on_friday";i:0;s:18:"closed_on_saturday";i:0;s:16:"closed_on_sunday";i:0;s:25:"delivery_closed_on_monday";i:0;s:26:"delivery_closed_on_tuesday";i:0;s:28:"delivery_closed_on_wednesday";i:0;s:27:"delivery_closed_on_thursday";i:0;s:25:"delivery_closed_on_friday";i:0;s:27:"delivery_closed_on_saturday";i:0;s:25:"delivery_closed_on_sunday";i:0;s:16:"order_delay_type";i:2;s:18:"delay_under_amount";i:5000;s:16:"amount_per_delay";i:0;s:18:"delay_time_minutes";i:0;s:13:"pay_at_pickup";i:0;s:22:"pay_with_house_account";i:0;s:15:"pay_with_credit";i:2;s:23:"send_orders_immediately";i:1;s:12:"display_name";s:22:"Lee Lin Chinese - Troy";s:23:"inherited_restaurant_id";i:0;s:9:"is_locked";i:0;s:10:"created_on";s:19:"2013-03-19 08:56:14";s:11:"modified_at";s:19:"2024-10-17 14:11:42";s:7:"street1";s:15:"539 Pawling Ave";s:7:"street2";s:0:"";s:4:"city";s:4:"Troy";s:5:"state";s:2:"NY";s:3:"zip";s:5:"12180";s:5:"suite";s:0:"";s:13:"primary_phone";s:14:"(518) 274-8816";s:12:"second_phone";s:0:"";s:11:"primary_fax";s:14:"(518) 274-8817";s:5:"email";s:26:"info@chinesemenuonline.com";s:18:"notification_email";s:0:"";s:14:"accepted_cards";s:23:"CASH|VISA|MC|DISC|AMEX|";s:18:"ordering_is_closed";i:0;s:28:"public_ordering_closed_until";s:19:"0000-00-00 00:00:00";s:19:"delay_under_minutes";i:25;s:18:"delay_over_minutes";i:30;s:25:"delivery_order_delay_type";i:2;s:27:"delivery_delay_under_amount";i:10000;s:25:"delivery_amount_per_delay";i:0;s:27:"delivery_delay_time_minutes";i:0;s:28:"delivery_delay_under_minutes";i:55;s:27:"delivery_delay_over_minutes";i:60;s:16:"delivery_minimum";i:1500;s:13:"order_minimum";i:0;s:18:"order_minimum_card";i:0;s:21:"order_sending_methods";i:34;s:18:"order_sending_type";i:3;s:14:"sms_is_enabled";i:0;s:17:"sms_require_click";i:0;s:23:"sms_click_failure_retry";i:0;s:23:"sms_click_failure_phone";i:0;s:18:"phone_notification";i:1;s:25:"phone_notification_number";s:14:"(518) 274-8816";s:27:"phone_notification_throttle";i:0;s:10:"is_deleted";i:0;s:15:"delivery_charge";d:0;s:20:"delivery_charge_type";i:1;s:23:"minimum_delivery_charge";i:0;s:13:"mobile_number";s:0:"";s:8:"latitude";d:42.7059187;s:9:"longitude";d:-73.6593171;s:15:"manual_position";i:0;s:13:"pdf_menu_file";i:0;s:19:"checkout_return_url";s:0:"";s:16:"show_pickup_time";i:1;s:14:"pickup_message";s:0:"";s:16:"delivery_message";s:0:"";s:14:"dinein_message";s:0:"";s:29:"additional_order_time_message";s:0:"";s:29:"select_menu_from_current_time";i:0;s:23:"pizza_option_percentage";d:0.5;s:10:"custom_url";s:0:"";s:18:"delivery_zip_codes";s:0:"";s:15:"delivery_radius";d:5;s:32:"encoded_delivery_radius_polyline";s:108:"eW1fZEd8YXJgTWJ6QX1zRHByQl97RnhiRnNjQGZoRHtHYndBaH5DaFl4ak5iQmBuQGFfRWRlRH16QmBtQnt0RmFqQGF8QmlhRmthQHNhRg==";s:9:"url_alias";s:21:"lee_lin_chinese__troy";s:34:"remote_web_service_notification_id";i:0;s:18:"external_vendor_id";i:0;s:15:"has_no_ordering";i:0;s:12:"option_label";s:0:"";s:13:"topping_label";s:0:"";s:11:"extra_label";s:0:"";s:18:"option_description";s:0:"";s:17:"extra_description";s:0:"";s:19:"topping_description";s:0:"";s:24:"instructions_description";s:64:"NOTE EXTRA CHARGES MAY BE INCURRED FOR ADDITIONS IN THIS SECTION";s:19:"per_order_surcharge";d:0;s:24:"per_order_surcharge_type";i:2;s:24:"per_order_surcharge_name";s:0:"";s:30:"per_order_surcharge_order_type";s:0:"";s:26:"voice_notification_message";s:121:"You have received a new online order. The customer's name is {CUSTOMER_NAME} and their phone number is {CUSTOMER_NUMBER}.";s:22:"require_phone_keypress";i:1;s:18:"phone_wait_minutes";i:3;s:16:"phone_call_tries";i:3;s:11:"amd_enabled";i:0;s:21:"sms_upon_call_failure";i:0;s:17:"is_directory_only";i:0;s:15:"hide_all_prices";i:0;s:32:"custom_pickup_order_confirmation";s:0:"";s:34:"custom_delivery_order_confirmation";s:0:"";s:23:"custom_rejection_markup";s:0:"";s:25:"custom_order_time_snippet";s:0:"";s:23:"disallow_multiple_menus";i:0;s:27:"permit_time_error_overrides";i:0;s:12:"freepos_tax1";d:0;s:12:"freepos_tax2";d:0;s:12:"freepos_tax3";d:0;s:23:"payment_processor_txkey";s:0:"";s:25:"payment_processor_loginid";s:0:"";s:28:"payment_processor_public_key";s:0:"";s:10:"dress_code";s:0:"";s:7:"parking";s:0:"";s:13:"entertainment";s:0:"";s:21:"custom_credit_message";s:0:"";s:28:"custom_delivery_zone_message";s:0:"";s:21:"has_store_hour_ranges";i:0;s:21:"has_no_default_prices";i:0;s:28:"custom_time_rejection_markup";s:0:"";s:16:"max_advance_days";i:7;s:30:"group_order_delivery_lead_time";i:0;s:28:"group_order_pickup_lead_time";i:0;s:14:"hide_asap_time";i:0;s:31:"alternate_delivery_destinations";s:0:"";s:16:"has_group_orders";i:0;s:20:"default_payment_type";i:0;s:18:"default_order_type";s:0:"";s:8:"is_store";i:0;s:25:"require_prep_time_opening";i:1;s:16:"price_sort_order";s:0:"";s:32:"permit_admin_time_error_override";i:0;s:17:"delivery_map_file";s:0:"";s:26:"delivery_charge_is_taxable";i:0;s:29:"delivery_allowed_till_closing";i:0;s:12:"cvv_required";i:1;s:24:"billing_address_required";i:0;s:18:"use_driving_radius";i:1;s:25:"show_future_order_minutes";i:90;s:17:"no_cc_at_delivery";i:1;s:23:"send_end_of_day_summary";i:0;s:6:"cc_fee";s:1:"0";s:16:"asap_orders_only";i:0;s:12:"asap_no_time";i:0;s:17:"delivery_fee_name";s:0:"";s:22:"additional_fee_taxable";i:0;s:7:"url_tag";s:20:"lee-lin-chinese-troy";s:8:"position";i:0;s:34:"label_instead_special_instructions";s:0:"";s:12:"cuisine_type";s:7:"Chinese";s:20:"same_day_orders_only";i:0;s:18:"hours_text_enabled";i:0;s:10:"hours_text";s:0:"";s:14:"hours_text_url";s:0:"";s:17:"order_button_text";s:0:"";s:25:"hide_special_instructions";i:0;s:29:"special_instructions_required";i:0;s:28:"special_instructions_details";s:0:"";s:23:"throttle_period_minutes";i:0;s:13:"throttle_rate";i:0;s:22:"delivery_throttle_rate";i:0;s:34:"show_future_order_delivery_minutes";i:90;s:32:"show_future_order_pickup_minutes";i:90;s:22:"default_tip_percentage";i:0;s:22:"combined_throttle_rate";i:0;s:22:"prep_time_message_type";s:7:"DEFAULT";s:24:"prep_time_message_pickup";s:0:"";s:26:"prep_time_message_delivery";s:0:"";s:24:"prep_time_message_dinein";s:0:"";s:30:"coupon_global_terms_conditions";s:0:"";s:19:"allow_tip_at_pickup";i:0;s:11:"default_tip";s:0:"";s:12:"allow_no_tip";i:0;s:25:"hide_0_tip_on_order_sheet";i:0;s:15:"pay_with_paypal";i:0;s:15:"cc_fee_includes";s:0:"";s:10:"image_file";s:0:"";s:21:"show_cutlery_checkbox";i:0;s:22:"cutlery_checkbox_label";s:0:"";s:21:"show_napkins_checkbox";i:0;s:22:"napkins_checkbox_label";s:0:"";s:33:"items_special_instructions_length";i:0;s:16:"bag_fees_enabled";i:0;s:18:"is_bag_fee_taxable";i:0;s:20:"bags_formula_enabled";i:0;s:28:"bags_formula_count_per_price";i:0;s:18:"bags_formula_price";i:0;s:21:"hold_calls_until_open";i:1;s:25:"min_online_payment_amount";i:0;s:18:"time_slots_enabled";i:0;s:15:"time_slots_view";i:0;s:32:"time_slots_delivery_orders_limit";i:0;s:30:"time_slots_pickup_orders_limit";i:0;s:32:"time_slots_combined_orders_limit";i:0;s:25:"custom_time_slots_enabled";i:0;s:6:"pos_id";s:0:"";s:12:"pos_password";s:0:"";s:11:"cc_fee_name";s:0:"";s:28:"order_status_webhook_enabled";i:0;s:24:"order_status_webhook_url";s:0:"";s:22:"supermenu_sync_enabled";i:0;s:16:"tip_display_name";s:0:"";s:21:"tip_highlight_enabled";i:0;s:28:"pickup_ordering_closed_until";N;s:30:"delivery_ordering_closed_until";N;s:28:"dinein_ordering_closed_until";N;s:17:"delivery_tax_code";s:0:"";s:23:"additional_fee_tax_code";s:0:"";s:26:"third_party_restaurant_fee";i:0;s:24:"third_party_customer_fee";i:0;s:25:"checkout_message_location";i:0;s:16:"checkout_message";s:0:"";s:29:"shipday_auto_dispatch_enabled";i:0;s:31:"third_party_delivery_radius_min";s:4:"0.00";s:31:"third_party_delivery_radius_max";s:4:"0.00";s:36:"third_party_optimal_delivery_enabled";i:0;s:17:"hide_driver_notes";i:0;s:19:"driver_notes_length";i:0;s:35:"third_party_delivery_radius_enabled";i:0;s:14:"is_best_seller";i:0;s:14:"rating_average";s:4:"0.00";s:12:"rating_count";i:0;s:15:"price_range_min";i:0;s:15:"price_range_max";i:0;s:16:"is_on_springroll";i:1;s:13:"google_rating";s:4:"3.50";s:18:"google_price_level";i:1;}s:13:"\x00*\x00dateFormat";N;s:9:"\x00*\x00events";a:0:{}s:14:"\x00*\x00observables";a:0:{}s:12:"\x00*\x00relations";a:0:{}s:10:"\x00*\x00touches";a:0:{}s:10:"\x00*\x00guarded";a:1:{i:0;s:1:"*";}s:17:"\x00*\x00_uploadAccount";N;}}"
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cache.class.php
    public static function Delete($key) {
        App::debugbarLog('debug', "Cache delete: $key");
        unset(static::$requestCache[$key]);
        if ($i = static::getInstance()) {
            if (strpos($key, '*') !== false) {
                $key = $i->keys($key);
            }
            return $i->del($key);
        }
        return false;
    }
 
    private static function RememberType($type, $allowNull, $key, callable $generator, $expire = 86400) {
        if (!static::getInstance()) {
            return false;
        }
 
        if ($type) {
            $notFound = $type == 'bool'? null : false;
            $value = static::GetType($type, $key, $allowNull, $notFound);
            if ($value !== $notFound) {
                return $value;
            }
        } else {
            if ($value = static::Get($key)) {
                return $value;
            }
        }
 
        $value = $generator();
        if (is_null($value) && !$allowNull) { //skips saving a null value if these are forbidden
            return null;
        }
        static::Set($key, $type? serialize($value) : $value, $expire);
 
        return $value;
    }
 
    /**
     * If the value for $key is not found, it's generated using $generator and then, stored for further uses.
Arguments
  1. "array"
    
  2. "restaurants_82986_display_name_1"
    
  3. true
    
  4. false
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Cache.class.php
     * @param string   $key
     * @param callable $generator
     * @param bool     $allowNull
     * @param int      $expire
     * @return null|bool|object
     */
    public static function RememberObject($key, callable $generator, $allowNull = false, $expire = 86400) {
        return static::RememberType('object', $allowNull, $key, $generator, $expire);
    }
 
    /**
     * If the value for $key is not found, it's generated using $generator and then, stored for further uses.
     * @param string   $key
     * @param callable $generator
     * @param bool     $allowNull
     * @param int      $expire
     * @return null|bool|array
     */
    public static function RememberArray($key, callable $generator, $allowNull = false, $expire = 86400) {
        return static::RememberType('array', $allowNull, $key, $generator, $expire);
    }
 
    /**
     * If the value for $key is not found, it's generated using $generator and then, stored for further uses.
     * @param string   $key
     * @param callable $generator
     * @param int      $expire
     * @return null|bool
     */
    public static function RememberBoolean($key, callable $generator, $expire = 86400) {
        return static::RememberType('array', false, $key, $generator, $expire);
    }
}
 
Arguments
  1. "array"
    
  2. true
    
  3. "restaurants_82986_display_name_1"
    
  4. Closure {
      class: "Account"
      use: {
        $aid: 82986
        $orderBy: "display_name"
        $activeOnly: true
      }
    }
    
  5. 86400
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Account.class.php
     * @param int    $aid
     * @param string $orderBy One of: position, id, display_name
     * @param bool   $activeOnly
     * @return Restaurant[]|null
     * @see Restaurant::clearCacheByAccountId() so you can clean up the cache keys
     */
    public static function getAllRestaurantsByAccountId($aid, $orderBy = 'display_name', $activeOnly = false) {
        $cacheKey = "restaurants_{$aid}_{$orderBy}_".($activeOnly? 1 : 0);
 
        return Cache::RememberArray($cacheKey, function () use ($aid, $orderBy, $activeOnly) {
            $list = Restaurant::isDeleted(false)->where('account_id', $aid);
            if ($activeOnly) {
                $list->where('is_locked', false);
            }
            if (in_array($orderBy, ['position', 'id', 'display_name'])) {
                $list->orderBy($orderBy);
            }
 
            return $list->get()->all()?: null;
        }, true);
    }
 
    /**
     * All restaurants for the current account which are not deleted and, optionally, not locked ($activeOnly)
     * @param string $orderBy One of: position, id, display_name
     * @param bool   $activeOnly
     * @return Restaurant[]|null
     */
    public function getAllRestaurants($orderBy = 'display_name', $activeOnly = false) {
        return self::getAllRestaurantsByAccountId($this->id, $orderBy, $activeOnly);
    }
 
    public static function checkIfRestaurantPhoneNumberExistsWithinAReseller($rid, $phone) {
        // We start by validating and formatting the given phone number
        $pv = new PhoneValidator($phone);
 
        // If the phone number is not valid, we return
        if ($phone == '' || !$pv->validate()) {
            return '';
        }
Arguments
  1. "restaurants_82986_display_name_1"
    
  2. Closure {
      class: "Account"
      use: {
        $aid: 82986
        $orderBy: "display_name"
        $activeOnly: true
      }
    }
    
  3. true
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Account.class.php
            $list = Restaurant::isDeleted(false)->where('account_id', $aid);
            if ($activeOnly) {
                $list->where('is_locked', false);
            }
            if (in_array($orderBy, ['position', 'id', 'display_name'])) {
                $list->orderBy($orderBy);
            }
 
            return $list->get()->all()?: null;
        }, true);
    }
 
    /**
     * All restaurants for the current account which are not deleted and, optionally, not locked ($activeOnly)
     * @param string $orderBy One of: position, id, display_name
     * @param bool   $activeOnly
     * @return Restaurant[]|null
     */
    public function getAllRestaurants($orderBy = 'display_name', $activeOnly = false) {
        return self::getAllRestaurantsByAccountId($this->id, $orderBy, $activeOnly);
    }
 
    public static function checkIfRestaurantPhoneNumberExistsWithinAReseller($rid, $phone) {
        // We start by validating and formatting the given phone number
        $pv = new PhoneValidator($phone);
 
        // If the phone number is not valid, we return
        if ($phone == '' || !$pv->validate()) {
            return '';
        }
 
        // Otherwise, we get the formatted number
        $formattedPhone = $pv->getPrettyNumber();
 
        $db_conn = DB::conn();
        $sql = "SELECT r.display_name FROM ".Restaurant::getTableName()." AS r INNER JOIN account AS a ON r.account_id = a.id WHERE a.reseller_user_id = ? AND TRIM(r.primary_phone) = ? LIMIT 1";
        $db_conn->bindParameter($sql, 1, $rid, "string");
        $db_conn->bindParameter($sql, 1, $formattedPhone, "string");
 
        $result = $db_conn->query($sql);
Arguments
  1. 82986
    
  2. "display_name"
    
  3. true
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Account.class.php
        //If the user has selected one of the following options.
        //Rest of day / 30 minutes / 1 hour / 2 hours /4 hours / Disable indefinitely
        $orderingClosedUntil = $restaurant->getPublicOrderingClosedUntil();
        if (!$orderingClosedUntil || $orderingClosedUntil < date('Y-m-d H:i:s')) {
            //getPublicOrderingClosedUntil() Does not exist or is smaller than NOW
            $orderingStatus = 'ACTIVE';
        } else {
            if ($orderingClosedUntil < date('Y-m-d H:i:s', strtotime(' +1 day'))) {
                //getPublicOrderingClosedUntil() exist and is smaller than Tomorrow
                $orderingStatus = 'TEMP DISABLE';
            } else {
                //getPublicOrderingClosedUntil() exist and is larger than Tomorrow
                $orderingStatus = 'DISABLE';
            }
        }
        return $orderingStatus;
    }
 
    public function getActiveRestaurants($order_by = 'display_name') {
        return $this->getAllRestaurants($order_by, true);
    }
 
    public function getRestaurantCount() {
        $restaurants = $this->getAllRestaurants('display_name', true);
 
        if (is_array($restaurants)) {
            return count($restaurants);
        }
        return 0;
    }
 
    /**
     * All restaurants for the given account which are not deleted and, optionally, not locked ($activeOnly)
     * @param int    $aid
     * @param string $orderBy One of: position, id, display_name
     * @param bool   $activeOnly
     * @return Restaurant[]|null
     * @see Restaurant::clearCacheByAccountId() so you can clean up the cache keys
     */
    public static function getAllRestaurantsByAccountId($aid, $orderBy = 'display_name', $activeOnly = false) {
Arguments
  1. "display_name"
    
  2. true
    
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
classes
/
Account.class.php
    public function getPaymentAggregatorMessage($type) {
        if ($this->payment_aggregator_messaging_enabled) {
            $config = Configuration::getDefault();
            if ($config->{"payment_aggregator_{$type}_message"}) {
                $paymentAggregator = $this->payment_aggregator;
                $aggregatorDetails = Account::PAYMENT_AGGREGATORS[$paymentAggregator];
                $message = str_replace('{PAYMENT_AGGREGATOR}', $aggregatorDetails['descriptor'], $config->{"payment_aggregator_{$type}_message"});
                $link = $aggregatorDetails['url'] ? ('<a href="' . $aggregatorDetails['url'] .'" target="_blank">' . $aggregatorDetails['descriptor'] . '</a>') : $aggregatorDetails['descriptor'];
                return str_replace('{PAYMENT_LINK}', ($link), $message);
            }
        }
        return '';
    }
 
    public function isShipdayOn() {
        return $this->shipday_enabled_status == Account::SHIPDAY_ENABLED_STATUS_ENABLED || $this->shipday_enabled_status == Account::SHIPDAY_ENABLED_STATUS_DISABLE_REQUESTED;
    }
 
    public function isOnSpringroll() {
        foreach ($this->getActiveRestaurants() as $restaurant) {
            if ($restaurant->is_on_springroll) {
                return true;
            }
        }
        return false;
    }
 
    public function getContextualAnnouncementsEnabled() {
        return isSpringroll() ? $this->springroll_announcements_enabled : $this->announcements_enabled;
    }
 
    public function getContextualAnnouncementsPlace() {
        return isSpringroll() ? $this->springroll_announcements_place : $this->announcements_place;
    }
 
    public function getContextualAnnouncementsHtml() {
        return isSpringroll() ? $this->springroll_announcements_html : $this->announcements_html;
    }
 
    /**
/
home
/
deploy
/
EHungry-8-simon
/
Web
/
controllers
/
customer.php
if ($customDomain) {
    $a = new Account($customDomain->getAccountId());
    if ($a->hasPermission(WHITELABEL)) {
        //adjust query string to match what the system expects without a custom domain
        $_REQUEST["aid"] = $a->getUrlTag();
        if (strpos($_SERVER['QUERY_STRING'], "aid=".$_REQUEST["aid"]) === false) {
            parse_str($_SERVER['QUERY_STRING'], $qs);
            $qs['aid'] = $a->getUrlTag();
            $_SERVER['QUERY_STRING'] = http_build_query($qs);
        }
        $customDomainSet = true;
    }
}
 
if (!$customDomainSet) {
    $_REQUEST['aid'] = array_shift($tokens);
}
 
$account = getAccountForRequest();
if (!$account || (isSpringroll() && !$account->isOnSpringroll())) {
    http_response_code(404);
    include(App_Path.'/Web/noaccount.php');
    exit(0);
}
/**
 * Used mainly for restricting queries with {@link BaseClass::$globalAccountScope} enabled.
 * The original $_SESSION['account_id'] holds the logged in Admin's account - which should be the same in most cases,
 * but you never know if they're browsing rival restaurants... And in the customer pages, that is used to identify the
 * admin is browsing its own pages.
 * @see isLoggedAsCustomerAdmin()
 */
$_SESSION['customer_account_id'] = $account->id;
 
//if user isn't on a custom domain and they're browsing an account on a URL other than the URL Tag, redirect to the URL Tag
if (!$customDomainSet && $_REQUEST['aid'] != $account->getUrlTag()) {
    $uri = str_ireplace($_REQUEST['aid'], $account->getUrlTag(), $_SERVER['REQUEST_URI']);
    header('Location: '.$uri, true, 301);
    exit(0);
}
 
/
home
/
deploy
/
EHungry-8-simon
/
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
  1. "/home/deploy/EHungry-8-simon/Web/controllers/customer.php"
    

Environment & details:

Key Value
aid
"restaurant/leelintroy/order/main/lunch-specials/31-string-beans-with-pork"
empty
empty
Key Value
PHPSESSID
"5fk02p4i4o0fvmv7opnknd1s5a"
Key Value
loc
"en_US"
customer_account_id
48913
restaurant_id
11246
cart
Cart {}
app_banner_shown
true
redirect_form
"checkout"
CSRF_TOKEN
array:1 [
  "register" => "739cc92e8edc97d5be4f809edee38d0ed9e894038bcea4fd67e0b2093732c06b"
]
menu_id
14156
Key Value
UNIQUE_ID
"aBIwnxHx8YIcChfmaJ1xCQAAAAI"
SCRIPT_URL
"/restaurant/leelintroy/order/main/lunch-specials/31-string-beans-with-pork"
SCRIPT_URI
"http://www.springroll.com.8.simon.ehungry.net/restaurant/leelintroy/order/main/lunch-specials/31-string-beans-with-pork"
HTTP_HOST
"www.springroll.com.8.simon.ehungry.net"
HTTP_X_REAL_IP
"18.217.200.151"
HTTP_X_FORWARDED_FOR
"18.217.200.151"
HTTP_X_CONFKEY
"Main_Domain:6462"
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=5fk02p4i4o0fvmv7opnknd1s5a"
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.8.simon.ehungry.net"
SERVER_ADDR
"127.0.0.1"
SERVER_PORT
"80"
REMOTE_ADDR
"127.0.0.1"
DOCUMENT_ROOT
"/home/deploy/EHungry-8-simon/Web"
REQUEST_SCHEME
"http"
CONTEXT_PREFIX
""
CONTEXT_DOCUMENT_ROOT
"/home/deploy/EHungry-8-simon/Web"
SERVER_ADMIN
"root@localhost"
SCRIPT_FILENAME
"/home/deploy/EHungry-8-simon/Web/index.php"
REMOTE_PORT
"52728"
GATEWAY_INTERFACE
"CGI/1.1"
SERVER_PROTOCOL
"HTTP/1.0"
REQUEST_METHOD
"GET"
QUERY_STRING
"aid=restaurant/leelintroy/order/main/lunch-specials/31-string-beans-with-pork"
REQUEST_URI
"/restaurant/leelintroy/order/main/lunch-specials/31-string-beans-with-pork"
SCRIPT_NAME
"/restaurant/leelintroy/order/main/lunch-specials/31-string-beans-with-pork"
PHP_SELF
"/restaurant/leelintroy/order/main/lunch-specials/31-string-beans-with-pork"
REQUEST_TIME_FLOAT
1746022559.048
REQUEST_TIME
1746022559
empty
0. Whoops\Handler\PrettyPageHandler