URL.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172
  1. <?php
  2. /**
  3. * URL constants file.
  4. *
  5. * Provides the app URLs.
  6. *
  7. * @author Iñigo Valentin <i@inigovalentin.com>
  8. * @license https://www.gnu.org/licenses/gpl-3.0.en.html GNU General Public License V3
  9. * @package IV
  10. */
  11. /**
  12. * The site base URL.
  13. */
  14. define('BASE_URL', NET::get_protocol() . $_SERVER["HTTP_HOST"] . "/");
  15. /**
  16. * In-app URLs.
  17. *
  18. * @category Data
  19. */
  20. final class URL{
  21. /**
  22. * Domain, with protcol (includes final '/').
  23. */
  24. const BASE = BASE_URL;
  25. /**
  26. * Profile page.
  27. */
  28. const PROFILE = BASE_URL . "profile/";
  29. /**
  30. * Projects page.
  31. */
  32. const PROJECTS = BASE_URL . "projects/";
  33. /**
  34. * Fonts full url (includes final '/').
  35. */
  36. const FONTS = BASE_URL . "fonts/";
  37. /**
  38. * CSS full url (includes final '/').
  39. */
  40. const CSS = BASE_URL . "css/";
  41. /**
  42. * JS full url (includes final '/').
  43. */
  44. const JS = BASE_URL . "js/";
  45. /**
  46. * Help full url (includes final '/').
  47. */
  48. const HELP = BASE_URL . "help/";
  49. /**
  50. * URLs to image resources.
  51. */
  52. const IMG = array(
  53. "BASE" => BASE_URL . "img/",
  54. "UNKNOWN" => BASE_URL . "img/unknown.png",
  55. "ICON" => BASE_URL . "img/layout/icon/",
  56. "CONTROL" => BASE_URL . "img/layout/control/",
  57. "LOGO" => BASE_URL . "img/layout/logo/",
  58. "LAYOUT" => BASE_URL . "img/layout/",
  59. "CONTENT" => BASE_URL . "img/content/",
  60. );
  61. }