Path.php 2.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. <?php
  2. /**
  3. * Path constants file.
  4. *
  5. * Provides paths to everything in the code tree.
  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. define('BASE_PATH', $_SERVER["DOCUMENT_ROOT"] . "/");
  12. /**
  13. * In-app directories (filesystem, not url).
  14. *
  15. * @category Data
  16. */
  17. final class PATH{
  18. /**
  19. * Path to the application direcory.
  20. */
  21. const APPLICATION = BASE_PATH . "../application/";
  22. /**
  23. * Path to the public direcory.
  24. */
  25. const BASE = BASE_PATH;
  26. /**
  27. * Path to the controller file.
  28. */
  29. const CONTROLLER = BASE_PATH . "../application/Controller.php";
  30. /**
  31. * Path to the entity files.
  32. */
  33. const ENTITY = BASE_PATH . "../application/entity/";
  34. /**
  35. * Path to the page files.
  36. */
  37. const PAGE = BASE_PATH . "../application/page/";
  38. /**
  39. * Path to the action files.
  40. */
  41. const ACTION = BASE_PATH . "../application/action/";
  42. /**
  43. * Path to the view files.
  44. */
  45. const VIEW = BASE_PATH . "../application/view/";
  46. /**
  47. * Paths to image resources.
  48. */
  49. const IMG = array(
  50. "BASE" => BASE_PATH . "img/",
  51. "UNKNOWN" => BASE_PATH . "img/unknown.png",
  52. "ICON" => BASE_PATH . "img/icon/",
  53. "LOGO" => BASE_PATH . "img/logo/",
  54. "CURRENCY" => BASE_PATH . "img/currency/",
  55. "UNIT" => BASE_PATH . "img/unit/",
  56. "AREA" => BASE_PATH . "img/area/",
  57. "SKILL" => BASE_PATH . "img/skill/",
  58. "ESSENCE" => BASE_PATH . "img/essence/",
  59. "RUNE" => BASE_PATH . "img/rune/",
  60. "GRIND" => BASE_PATH . "img/grind/",
  61. "ELEMENT" => BASE_PATH . "img/element/",
  62. "SKILL_GUILD" => BASE_PATH . "img/skill_guild/",
  63. "DECORATION" => BASE_PATH . "img/decoration/",
  64. "SOURCE" => BASE_PATH . "img/source/",
  65. "SKILL_LEADER" => BASE_PATH . "img/skill_leader/",
  66. "INVENTORY" => BASE_PATH . "img/inventory/",
  67. "EFFECT" => BASE_PATH . "img/effect/",
  68. "BUILDING" => BASE_PATH . "img/building/",
  69. );
  70. /**
  71. * Path to the helper files.
  72. */
  73. const HELPER = BASE_PATH . "../application/helper/";
  74. /**
  75. * Path to the text resources.
  76. */
  77. const TEXT = BASE_PATH . "../application/resources/text/";
  78. }