application.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226
  1. <?php
  2. return
  3. [
  4. /**
  5. * ---------------------------------------------------------
  6. * Base URL.
  7. * ---------------------------------------------------------
  8. *
  9. * Base URL of your application.
  10. *
  11. * It will be auto-detected in a web environment if left empty
  12. * but should be configured if you plan to build URLs in the
  13. * command line.
  14. */
  15. 'base_url' => '',
  16. /**
  17. * ---------------------------------------------------------
  18. * Clean URLs
  19. * ---------------------------------------------------------
  20. *
  21. * Set to true to hide "index.php" from your urls.
  22. */
  23. 'clean_urls' => true,
  24. /**
  25. * ---------------------------------------------------------
  26. * Timezone
  27. * ---------------------------------------------------------
  28. *
  29. * Set the default timezone used by various PHP date functions.
  30. */
  31. 'timezone' => 'UTC',
  32. /**
  33. * ---------------------------------------------------------
  34. * Charset
  35. * ---------------------------------------------------------
  36. *
  37. * Default character set used internally in the framework.
  38. */
  39. 'charset' => 'UTF-8',
  40. /**
  41. * ---------------------------------------------------------
  42. * Language
  43. * ---------------------------------------------------------
  44. *
  45. * Default application language and locale.
  46. */
  47. 'default_language' => ['strings' => 'en_US', 'locale' => [LC_ALL => ['en_US.UTF-8', 'en_US.utf8', 'C'], LC_NUMERIC => 'C']],
  48. /**
  49. * ---------------------------------------------------------
  50. * Languages
  51. * ---------------------------------------------------------
  52. *
  53. * If the first segment of the request path matches the language (array key)
  54. * then the default language will be set to the mapped language (array value).
  55. */
  56. 'languages' =>
  57. [
  58. //'no' => ['strings' => 'nb_NO', 'locale' => [LC_ALL => ['nb_NO.UTF-8', 'nb_NO.utf8', 'C'], LC_NUMERIC => 'C']],
  59. //'fr' => ['strings' => 'fr_FR', 'locale' => [LC_ALL => ['fr_FR.UTF-8', 'fr_FR.utf8', 'C'], LC_NUMERIC => 'C']],
  60. ],
  61. /**
  62. * ---------------------------------------------------------
  63. * Language cache
  64. * ---------------------------------------------------------
  65. *
  66. * Enabling language caching can speed up applications with a lot of language files by
  67. * reducing the number of files it has to load on every request.
  68. *
  69. * Use the default cache store by setting the config value to TRUE and choose a specific cache configuration
  70. * by specifying its name (as specified in the cache configuration).
  71. */
  72. 'language_cache' => false,
  73. /**
  74. * ---------------------------------------------------------
  75. * Commands
  76. * ---------------------------------------------------------
  77. *
  78. * This is where you register your reactor commands.
  79. * The array key is the command name and the array value
  80. * is the command class.
  81. */
  82. 'commands' =>
  83. [
  84. 'greeting' => 'app\console\commands\Greeting',
  85. ],
  86. /**
  87. * ---------------------------------------------------------
  88. * Services
  89. * ---------------------------------------------------------
  90. *
  91. * Services to register in the dependecy injection container.
  92. * They will be registered in the order that they are defined.
  93. *
  94. * core: Services that are required for both the web an the command line interface
  95. * web : Services that are only required for the web
  96. * cli : Services that are only required for the command line interface
  97. */
  98. 'services' =>
  99. [
  100. 'core' =>
  101. [
  102. 'mako\application\services\SignerService',
  103. 'mako\application\services\HTTPService',
  104. 'mako\application\services\LoggerService',
  105. 'mako\application\services\ViewFactoryService',
  106. //'mako\application\services\SessionService',
  107. 'mako\application\services\DatabaseService',
  108. //'mako\application\services\RedisService',
  109. 'mako\application\services\I18nService',
  110. //'mako\application\services\HumanizerService',
  111. //'mako\application\services\CacheService',
  112. //'mako\application\services\CryptoService',
  113. //'mako\application\services\ValidatorFactoryService',
  114. //'mako\application\services\PaginationFactoryService',
  115. 'mako\application\services\GatekeeperService',
  116. //'mako\application\services\EventService',
  117. //'mako\application\services\CommandBusService',
  118. ],
  119. 'web' =>
  120. [
  121. 'mako\application\services\web\ErrorHandlerService',
  122. ],
  123. 'cli' =>
  124. [
  125. 'mako\application\services\cli\ErrorHandlerService',
  126. ],
  127. ],
  128. /**
  129. * ---------------------------------------------------------
  130. * Packages
  131. * ---------------------------------------------------------
  132. *
  133. * Packages to boot during the application boot sequence.
  134. * They will be booted in the order that they are defined.
  135. *
  136. * core: Packages that are required for both the web an the command line interface
  137. * web : Packages that are only required for the web
  138. * cli : Packages that are only required for the command line interface
  139. */
  140. 'packages' =>
  141. [
  142. 'core' =>
  143. [
  144. ],
  145. 'web' =>
  146. [
  147. ],
  148. 'cli' =>
  149. [
  150. ],
  151. ],
  152. /**
  153. * ---------------------------------------------------------
  154. * Secret
  155. * ---------------------------------------------------------
  156. *
  157. * The secret is used to provide cryptographic signing, and should be set to a unique, unpredictable value.
  158. * You should NOT use the secret included with the framework in a production environment!
  159. */
  160. 'secret' => 'hex:2791a763a64b315b932ccf68de887f4cccb4ce85bf8ce5d6789f7bddf650a5ce',
  161. /**
  162. * ---------------------------------------------------------
  163. * Trusted proxies
  164. * ---------------------------------------------------------
  165. *
  166. * If your application isn't behind a proxy you trust then you can (and should) leave this empty.
  167. * If it is behind a proxy then you can help the framework return the correct client IP (using the X-Forwarded-For header)
  168. * by listing your proxy IP address(es) here.
  169. */
  170. 'trusted_proxies' =>
  171. [
  172. ],
  173. /**
  174. * ---------------------------------------------------------
  175. * Serialization whitelist.
  176. * ---------------------------------------------------------
  177. *
  178. * Array of classes that you'll allow the framework to deserialize.
  179. * Set to FALSE for none and TRUE for all.
  180. */
  181. 'deserialization_whitelist' => false,
  182. /**
  183. * ---------------------------------------------------------
  184. * Error handling
  185. * ---------------------------------------------------------
  186. *
  187. * log_errors : Set to true if you want to log errors caught by the Mako errors handler.
  188. * display_errors: Set to true to display errors caught by the mako error handlers.
  189. */
  190. 'error_handler' =>
  191. [
  192. 'log_errors' => true,
  193. 'display_errors' => true, // It is recommended to set this value to false when you are in production.
  194. ],
  195. /**
  196. * ---------------------------------------------------------
  197. * Class aliases
  198. * ---------------------------------------------------------
  199. *
  200. * The key is the alias and the value is the actual class.
  201. */
  202. 'class_aliases' =>
  203. [
  204. ],
  205. ];