URL.php 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  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. * URLs to image resources.
  43. */
  44. const IMG = array(
  45. "BASE" => BASE_URL . "img/",
  46. "UNKNOWN" => BASE_URL . "img/unknown.png",
  47. "ICON" => BASE_URL . "img/icon/",
  48. "LOGO" => BASE_URL . "img/logo/",
  49. "LAYOUT" => BASE_URL . "img/layout/",
  50. "CONTENT" => BASE_URL . "img/content/",
  51. );
  52. }