protected function setUpConstants(Container $app) { define('_SITENAME', $app['config']->get('app.name')); define('_ADMIN_MAIL', $app['config']->get('app.email')); /*======================================================== SOME GLOBAL DEFINATIONS /*********************************************************/ $name = strtolower(rtrim($app->getNameSpace(), '\\')); define('SYSTEM', APP . $name . DS); defined('PUBLICD') or define('PUBLICD', APP . 'public' . DS); defined('UPLOAD') or define('UPLOAD', PUBLICD . 'uploads' . DS); defined('IMAGES') or define('IMAGES', UPLOAD); defined('MEDIA') or define('MEDIA', UPLOAD . 'media' . DS); defined('STATICD') or define('STATICD', PUBLICD . 'static/'); defined('STORAGE') or define('STORAGE', APP . 'storage' . DS); defined('TMP') or define('TMP', STORAGE . 'tmp' . DS); defined('CACHE') or define('CACHE', STORAGE . 'cache' . DS); defined('LOGS') or define('LOGS', STORAGE . 'logs' . DS); defined('THEMES') or define('THEMES', PUBLICD . 'themes' . DS); /*======================================================== COOKIE SETTINGS /*********************************************************/ define('COOKIE_SUFX', md5($app['config']->get('session.options.cookie_domain'))); define('COOKIE_PATH', preg_replace('|https?://[^/]+|i', '', _URL)); define('COOKIE_NAME', 'NAME_' . COOKIE_SUFX); define('COOKIE_KEY', 'KEY_' . COOKIE_SUFX); define('COOKIE_UID', 'UID_' . COOKIE_SUFX); define('COOKIE_TIME', 864000); // 10 days : 60(sec)*60(min)*24(hrs)*10(days) }