ide-helper.php 6.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197
  1. <?php
  2. return array(
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Filename & Format
  6. |--------------------------------------------------------------------------
  7. |
  8. | The default filename (without extension) and the format (php or json)
  9. |
  10. */
  11. 'filename' => '_ide_helper',
  12. 'format' => 'php',
  13. 'meta_filename' => '.phpstorm.meta.php',
  14. /*
  15. |--------------------------------------------------------------------------
  16. | Fluent helpers
  17. |--------------------------------------------------------------------------
  18. |
  19. | Set to true to generate commonly used Fluent methods
  20. |
  21. */
  22. 'include_fluent' => false,
  23. /*
  24. |--------------------------------------------------------------------------
  25. | Write Model Magic methods
  26. |--------------------------------------------------------------------------
  27. |
  28. | Set to false to disable write magic methods of model
  29. |
  30. */
  31. 'write_model_magic_where' => true,
  32. /*
  33. |--------------------------------------------------------------------------
  34. | Write Eloquent Model Mixins
  35. |--------------------------------------------------------------------------
  36. |
  37. | This will add the necessary DocBlock mixins to the model class
  38. | contained in the Laravel Framework. This helps the IDE with
  39. | auto-completion.
  40. |
  41. | Please be aware that this setting changes a file within the /vendor directory.
  42. |
  43. */
  44. 'write_eloquent_model_mixins' => false,
  45. /*
  46. |--------------------------------------------------------------------------
  47. | Helper files to include
  48. |--------------------------------------------------------------------------
  49. |
  50. | Include helper files. By default not included, but can be toggled with the
  51. | -- helpers (-H) option. Extra helper files can be included.
  52. |
  53. */
  54. 'include_helpers' => false,
  55. 'helper_files' => array(
  56. base_path().'/vendor/laravel/framework/src/Illuminate/Support/helpers.php',
  57. ),
  58. /*
  59. |--------------------------------------------------------------------------
  60. | Model locations to include
  61. |--------------------------------------------------------------------------
  62. |
  63. | Define in which directories the ide-helper:models command should look
  64. | for models.
  65. |
  66. */
  67. 'model_locations' => array(
  68. 'app',
  69. ),
  70. /*
  71. |--------------------------------------------------------------------------
  72. | Extra classes
  73. |--------------------------------------------------------------------------
  74. |
  75. | These implementations are not really extended, but called with magic functions
  76. |
  77. */
  78. 'extra' => array(
  79. 'Eloquent' => array('Illuminate\Database\Eloquent\Builder', 'Illuminate\Database\Query\Builder'),
  80. 'Session' => array('Illuminate\Session\Store'),
  81. ),
  82. 'magic' => array(),
  83. /*
  84. |--------------------------------------------------------------------------
  85. | Interface implementations
  86. |--------------------------------------------------------------------------
  87. |
  88. | These interfaces will be replaced with the implementing class. Some interfaces
  89. | are detected by the helpers, others can be listed below.
  90. |
  91. */
  92. 'interfaces' => array(
  93. ),
  94. /*
  95. |--------------------------------------------------------------------------
  96. | Support for custom DB types
  97. |--------------------------------------------------------------------------
  98. |
  99. | This setting allow you to map any custom database type (that you may have
  100. | created using CREATE TYPE statement or imported using database plugin
  101. | / extension to a Doctrine type.
  102. |
  103. | Each key in this array is a name of the Doctrine2 DBAL Platform. Currently valid names are:
  104. | 'postgresql', 'db2', 'drizzle', 'mysql', 'oracle', 'sqlanywhere', 'sqlite', 'mssql'
  105. |
  106. | This name is returned by getName() method of the specific Doctrine/DBAL/Platforms/AbstractPlatform descendant
  107. |
  108. | The value of the array is an array of type mappings. Key is the name of the custom type,
  109. | (for example, "jsonb" from Postgres 9.4) and the value is the name of the corresponding Doctrine2 type (in
  110. | our case it is 'json_array'. Doctrine types are listed here:
  111. | http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html
  112. |
  113. | So to support jsonb in your models when working with Postgres, just add the following entry to the array below:
  114. |
  115. | "postgresql" => array(
  116. | "jsonb" => "json_array",
  117. | ),
  118. |
  119. */
  120. 'custom_db_types' => array(
  121. ),
  122. /*
  123. |--------------------------------------------------------------------------
  124. | Support for camel cased models
  125. |--------------------------------------------------------------------------
  126. |
  127. | There are some Laravel packages (such as Eloquence) that allow for accessing
  128. | Eloquent model properties via camel case, instead of snake case.
  129. |
  130. | Enabling this option will support these packages by saving all model
  131. | properties as camel case, instead of snake case.
  132. |
  133. | For example, normally you would see this:
  134. |
  135. | * @property \Illuminate\Support\Carbon $created_at
  136. | * @property \Illuminate\Support\Carbon $updated_at
  137. |
  138. | With this enabled, the properties will be this:
  139. |
  140. | * @property \Illuminate\Support\Carbon $createdAt
  141. | * @property \Illuminate\Support\Carbon $updatedAt
  142. |
  143. | Note, it is currently an all-or-nothing option.
  144. |
  145. */
  146. 'model_camel_case_properties' => false,
  147. /*
  148. |--------------------------------------------------------------------------
  149. | Property Casts
  150. |--------------------------------------------------------------------------
  151. |
  152. | Cast the given "real type" to the given "type".
  153. |
  154. */
  155. 'type_overrides' => array(
  156. 'integer' => 'int',
  157. 'boolean' => 'bool',
  158. ),
  159. /*
  160. |--------------------------------------------------------------------------
  161. | Include DocBlocks from classes
  162. |--------------------------------------------------------------------------
  163. |
  164. | Include DocBlocks from classes to allow additional code inspection for
  165. | magic methods and properties.
  166. |
  167. */
  168. 'include_class_docblocks' => false,
  169. );