public static function setNailsConstants()
    {
        //  Generic and branding constants
        Functions::define('NAILS_PACKAGE_NAME', 'Nails');
        Functions::define('NAILS_PACKAGE_URL', 'http://nailsapp.co.uk/');
        Functions::define('NAILS_BRANDING', true);

        //  Paths
        Functions::define('NAILS_PATH', static::$sBaseDirectory . 'vendor/nails/');
        Functions::define('NAILS_APP_PATH', static::$sBaseDirectory);
        Functions::define('NAILS_COMMON_PATH', NAILS_PATH . 'common/');
        Functions::define('NAILS_CI_APP_PATH', static::$sBaseDirectory . 'vendor/codeigniter/framework/application/');
        Functions::define('NAILS_CI_SYSTEM_PATH', static::$sBaseDirectory . 'vendor/codeigniter/framework/system/');

        //  So CodeIgniter configures itself correctly
        Functions::define('BASEPATH', NAILS_CI_SYSTEM_PATH);

        //  URLs
        Functions::define('BASE_URL', '/');
        Functions::define('SECURE_BASE_URL', preg_replace('/^http:/', 'https:', BASE_URL));
        Functions::define('NAILS_URL', (Functions::isPageSecure() ? SECURE_BASE_URL : BASE_URL) . 'vendor/nails/');

        //  @todo (Pablo - 2018-11-16) - Move these into the asset service
        Functions::define('NAILS_ASSETS_URL', NAILS_URL . 'module-asset/assets/');
        Functions::define('NAILS_ASSETS_PATH', NAILS_PATH . 'module-asset/assets/');

        //  Environment
        Functions::define('ENVIRONMENT', Environment::ENV_DEV);
        Functions::define('NAILS_TIMEZONE', 'UTC');

        //  Cache constants
        //  @todo (Pablo - 2018-11-16) - Move these to the cache service
        Functions::define('CACHE_PATH', static::$sBaseDirectory . 'cache' . DIRECTORY_SEPARATOR . 'private' . DIRECTORY_SEPARATOR);
        Functions::define('CACHE_PUBLIC_PATH', static::$sBaseDirectory . 'cache' . DIRECTORY_SEPARATOR . 'public' . DIRECTORY_SEPARATOR);
        Functions::define('CACHE_PUBLIC_URL', rtrim(BASE_URL, '/') . '/cache/public/');

        //  Database
        //  @todo (Pablo - 2018-11-16) - Move these to the database service

        //  Consistent between deployments
        Functions::define('APP_DB_DRIVER', 'mysqli');
        Functions::define('APP_DB_GLOBAL_PREFIX', '');
        Functions::define('APP_DB_PCONNECT', true);
        Functions::define('APP_DB_CACHE', false);
        Functions::define('APP_DB_CHARSET', 'utf8mb4');
        Functions::define('APP_DB_DBCOLLAT', 'utf8mb4_unicode_ci');
        Functions::define('APP_DB_STRICT', true);
        Functions::define('NAILS_DB_PREFIX', 'nails_');
        Functions::define('APP_DB_PREFIX', '');

        //  Potentially vary between deployments
        Functions::define('DEPLOY_DB_HOST', 'localhost');
        Functions::define('DEPLOY_DB_USERNAME', '');
        Functions::define('DEPLOY_DB_PASSWORD', '');
        Functions::define('DEPLOY_DB_DATABASE', '');

        //  App Constants
        Functions::define('APP_PRIVATE_KEY', '');
        Functions::define('APP_NAME', 'Untitled');
        Functions::define('APP_NATIVE_LOGIN_USING', 'BOTH');   //  [EMAIL|USERNAME|BOTH]

        //  Log constants
        //  @todo (Pablo - 2018-11-16) - Move these to the log service
        Functions::define('DEPLOY_LOG_DIR', static::$sBaseDirectory . 'application/logs/');

        //  Email constants
        Functions::define('APP_DEVELOPER_EMAIL', '');
        Functions::define('EMAIL_OVERRIDE', '');
        Functions::define('EMAIL_WHITELIST', '');
        Functions::define('DEPLOY_EMAIL_HOST', '127.0.0.1');
        Functions::define('DEPLOY_EMAIL_USER', '');
        Functions::define('DEPLOY_EMAIL_PASS', '');
        Functions::define('DEPLOY_EMAIL_PORT', 25);

        //  Ensure the app's constants file is also loaded
        //  @todo (Pablo - 2018-11-16) - Remove reliance on this feature
        if (is_file(static::$sBaseDirectory . 'application/config/constants.php')) {
            require_once static::$sBaseDirectory . 'application/config/constants.php';
        }
    }