ide-helper.php 6.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205
  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' => true,
  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. 'Log' => array(
  84. 'debug' => 'Monolog\Logger::addDebug',
  85. 'info' => 'Monolog\Logger::addInfo',
  86. 'notice' => 'Monolog\Logger::addNotice',
  87. 'warning' => 'Monolog\Logger::addWarning',
  88. 'error' => 'Monolog\Logger::addError',
  89. 'critical' => 'Monolog\Logger::addCritical',
  90. 'alert' => 'Monolog\Logger::addAlert',
  91. 'emergency' => 'Monolog\Logger::addEmergency',
  92. )
  93. ),
  94. /*
  95. |--------------------------------------------------------------------------
  96. | Interface implementations
  97. |--------------------------------------------------------------------------
  98. |
  99. | These interfaces will be replaced with the implementing class. Some interfaces
  100. | are detected by the helpers, others can be listed below.
  101. |
  102. */
  103. 'interfaces' => array(),
  104. /*
  105. |--------------------------------------------------------------------------
  106. | Support for custom DB types
  107. |--------------------------------------------------------------------------
  108. |
  109. | This setting allow you to map any custom database type (that you may have
  110. | created using CREATE TYPE statement or imported using database plugin
  111. | / extension to a Doctrine type.
  112. |
  113. | Each key in this array is a name of the Doctrine2 DBAL Platform. Currently valid names are:
  114. | 'postgresql', 'db2', 'drizzle', 'mysql', 'oracle', 'sqlanywhere', 'sqlite', 'mssql'
  115. |
  116. | This name is returned by getName() method of the specific Doctrine/DBAL/Platforms/AbstractPlatform descendant
  117. |
  118. | The value of the array is an array of type mappings. Key is the name of the custom type,
  119. | (for example, "jsonb" from Postgres 9.4) and the value is the name of the corresponding Doctrine2 type (in
  120. | our case it is 'json_array'. Doctrine types are listed here:
  121. | http://doctrine-dbal.readthedocs.org/en/latest/reference/types.html
  122. |
  123. | So to support jsonb in your models when working with Postgres, just add the following entry to the array below:
  124. |
  125. | "postgresql" => array(
  126. | "jsonb" => "json_array",
  127. | ),
  128. |
  129. */
  130. 'custom_db_types' => array(),
  131. /*
  132. |--------------------------------------------------------------------------
  133. | Support for camel cased models
  134. |--------------------------------------------------------------------------
  135. |
  136. | There are some Laravel packages (such as Eloquence) that allow for accessing
  137. | Eloquent model properties via camel case, instead of snake case.
  138. |
  139. | Enabling this option will support these packages by saving all model
  140. | properties as camel case, instead of snake case.
  141. |
  142. | For example, normally you would see this:
  143. |
  144. | * @property \Illuminate\Support\Carbon $created_at
  145. | * @property \Illuminate\Support\Carbon $updated_at
  146. |
  147. | With this enabled, the properties will be this:
  148. |
  149. | * @property \Illuminate\Support\Carbon $createdAt
  150. | * @property \Illuminate\Support\Carbon $updatedAt
  151. |
  152. | Note, it is currently an all-or-nothing option.
  153. |
  154. */
  155. 'model_camel_case_properties' => false,
  156. /*
  157. |--------------------------------------------------------------------------
  158. | Property Casts
  159. |--------------------------------------------------------------------------
  160. |
  161. | Cast the given "real type" to the given "type".
  162. |
  163. */
  164. 'type_overrides' => array(
  165. 'integer' => 'int',
  166. 'boolean' => 'bool',
  167. ),
  168. /*
  169. |--------------------------------------------------------------------------
  170. | Include DocBlocks from classes
  171. |--------------------------------------------------------------------------
  172. |
  173. | Include DocBlocks from classes to allow additional code inspection for
  174. | magic methods and properties.
  175. |
  176. */
  177. 'include_class_docblocks' => false,
  178. );