<?php
    /**
     * Configuration variables.
     *
     * Not meant to be edited by the user.
     *
     * @category Data
     */

    /**
     * Define constant and includesome helpers.
     */
    define('BASE_PATH', $_SERVER["DOCUMENT_ROOT"] . "/");
    require_once(__DIR__ . "/helper/NET_Helper.php");
    define('BASE_URL', NET::get_protocol() . $_SERVER["HTTP_HOST"] . "/");

    /**
     * App related constants.
     *
     * @category Data
     */
    final class APP{

        /**
         * App version.
         *
         * Can be any string, not just numbers.
         */
        const VERSION = "2";
    }

    /**
     * In-app URLs.
     *
     * @category Data
     */
    final class URL{

        /**
         * Domain, with protcol (includes final '/').
         */
        const BASE = BASE_URL;

        /**
         * Fonts full url (includes final '/').
         */
        const FONTS = BASE_URL . "/fonts/";

        /**
         * CSS full url (includes final '/').
         */
        const CSS = BASE_URL . "/css/";

        /**
         * Paths to image resources.
         */
        const IMG = array(
            "BASE" => BASE_URL . "img/",
            "UNKNOWN" => BASE_URL . "img/unknown.png",
            "ICON" => BASE_URL . "img/icon/",
            "LOGO" => BASE_URL . "img/logo/",
            "CURRENCY" => BASE_URL . "img/currency/",
            "UNIT" => BASE_URL . "img/unit/",
            "AREA" => BASE_URL . "img/area/",
            "SKILL" => BASE_URL . "img/skill/",
            "ESSENCE" => BASE_URL . "img/essence/",
            "RUNE" => BASE_URL . "img/rune/",
            "GRIND" => BASE_URL . "img/grind/",
            "ELEMENT" => BASE_URL . "img/element/",
            "SKILL_GUILD" => BASE_URL . "img/skill_guild/",
            "DECORATION" => BASE_URL . "img/decoration/",
            "SOURCE" => BASE_URL . "img/source/",
            "SKILL_LEADER" => BASE_URL . "img/skill_leader/",
            "INVENTORY" => BASE_URL . "img/inventory/",
            "EFFECT" => BASE_URL . "img/effect/",
            "BUILDING" => BASE_URL . "img/building/",
        );
    }

    /**
     * In-app directories (filesystem, not url).
     *
     * @category Data
     */
    final class PATH{

        /**
         * Path to the application direcory.
         */
        const APPLICATION = BASE_PATH . "../application/";

        /**
         * Path to the public direcory.
         */
        const BASE = BASE_PATH;

        /**
         * Path to the controller file.
         */
        const CONTROLLER = BASE_PATH . "../application/Controller.php";

        /**
         * Path to the entity files.
         */
        const ENTITY = BASE_PATH . "../application/entity/";

        /**
         * Path to the page files.
         */
        const PAGE = BASE_PATH . "../application/page/";

        /**
         * Path to the action files.
         */
        const ACTION = BASE_PATH . "../application/action/";

        /**
         * Path to the view files.
         */
        const VIEW = BASE_PATH . "../application/view/";

        /**
         * Path to the helper files.
         */
        const HELPER = BASE_PATH . "../application/helper/";

        /**
         * Path to the db_key files.
         */
        const DB_KEY = BASE_PATH . "../application/sw.sqlite";

        /**
         * Path to the db_data files.
         */
        const DB_DATA = BASE_PATH . "../data/sw.sqlite";

    }

?>


