<?php
//error_reporting(E_ALL ^ E_NOTICE);
error_reporting(E_ALL & ~E_DEPRECATED & ~E_USER_DEPRECATED & ~E_NOTICE & ~E_WARNING);


// Define path to application directory
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/../application'));

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

// Ensure library/ is on include_path
set_include_path(implode(PATH_SEPARATOR, array(
    realpath(APPLICATION_PATH . '/../library'),
    get_include_path(),
)));
defined('RESERVATION_PREFIX')
    || define('RESERVATION_PREFIX', 'BOOK_');
defined('GUESTCODE_PREFIX')
    || define('GUESTCODE_PREFIX', 'GU');
defined('SITE_NAME')
    || define('SITE_NAME', 'LIFORYOU srl');
defined('SITE_URL')
    || define('SITE_URL', 'https://www.liforyou.it');
defined('EURO_SYMBOL')
    || define('EURO_SYMBOL', '&euro;');
define('BASE_URL','https://'.$_SERVER["HTTP_HOST"].'/');
define('BASE_URI', $_SERVER["DOCUMENT_ROOT"].'/');

require_once dirname(__DIR__) . '/library/vendor/autoload.php';
require_once dirname(__DIR__) . '/library/apc_compat.php';
require_once dirname(__DIR__) . '/library/php8_count_compat.php';
require_once dirname(__DIR__) . '/library/money_compat.php';


/** Zend_Application */
require_once 'Zend/Application.php';  

// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV, 
    APPLICATION_PATH . '/configs/application.ini'
);

Zend_Controller_Front::getInstance()->throwExceptions(true);

$application->bootstrap()
            ->run();
