|
1 | | -<?php namespace Config; |
| 1 | +<?php |
2 | 2 |
|
3 | | -/*** |
| 3 | +namespace Config; |
| 4 | + |
| 5 | +/* |
4 | 6 | * |
5 | 7 | * This file contains example values to override or augment default library behavior. |
6 | 8 | * Recommended usage: |
|
9 | 11 | * 3. Add additional route-specific assets to $routes |
10 | 12 | * 4. Remove any lines to fallback to defaults |
11 | 13 | * |
12 | | -***/ |
| 14 | +*/ |
13 | 15 |
|
14 | 16 | use Tatter\Assets\Config\Assets as AssetsConfig; |
15 | 17 |
|
16 | 18 | class Assets extends AssetsConfig |
17 | 19 | { |
18 | | - //-------------------------------------------------------------------- |
19 | | - // Library Behavior |
20 | | - //-------------------------------------------------------------------- |
| 20 | + //-------------------------------------------------------------------- |
| 21 | + // Library Behavior |
| 22 | + //-------------------------------------------------------------------- |
21 | 23 |
|
22 | | - /** |
23 | | - * Asset URI base, relative to baseURL. |
24 | | - * |
25 | | - * @var string |
26 | | - */ |
27 | | - public $uri = 'assets/'; |
| 24 | + /** |
| 25 | + * Asset URI base, relative to baseURL. |
| 26 | + * |
| 27 | + * @var string |
| 28 | + */ |
| 29 | + public $uri = 'assets/'; |
28 | 30 |
|
29 | | - /** |
30 | | - * Asset storage location in the filesystem. |
31 | | - * Must be somewhere web accessible. |
32 | | - * |
33 | | - * @var string |
34 | | - */ |
35 | | - public $directory = FCPATH . 'assets/'; |
| 31 | + /** |
| 32 | + * Asset storage location in the filesystem. |
| 33 | + * Must be somewhere web accessible. |
| 34 | + * |
| 35 | + * @var string |
| 36 | + */ |
| 37 | + public $directory = FCPATH . 'assets/'; |
36 | 38 |
|
37 | | - /** |
38 | | - * Whether to append file modification timestamps on asset tags. |
39 | | - * Makes it less likely for modified assets to remain cached. |
40 | | - * |
41 | | - * @var bool |
42 | | - */ |
43 | | - public $useTimestamps = true; |
| 39 | + /** |
| 40 | + * Whether to append file modification timestamps on asset tags. |
| 41 | + * Makes it less likely for modified assets to remain cached. |
| 42 | + * |
| 43 | + * @var bool |
| 44 | + */ |
| 45 | + public $useTimestamps = true; |
44 | 46 |
|
45 | | - /** |
46 | | - * Whether to cache bundles for faster route responses. |
47 | | - * |
48 | | - * @var bool |
49 | | - */ |
50 | | - public $useCache = ENVIRONMENT === 'production'; |
| 47 | + /** |
| 48 | + * Whether to cache bundles for faster route responses. |
| 49 | + * |
| 50 | + * @var bool |
| 51 | + */ |
| 52 | + public $useCache = ENVIRONMENT === 'production'; |
51 | 53 |
|
52 | | - //-------------------------------------------------------------------- |
53 | | - // Route Assets |
54 | | - //-------------------------------------------------------------------- |
| 54 | + //-------------------------------------------------------------------- |
| 55 | + // Route Assets |
| 56 | + //-------------------------------------------------------------------- |
55 | 57 |
|
56 | | - /** |
57 | | - * Assets to apply to each route. Routes may use * as a wildcard to |
58 | | - * allow any valid character, similar to URL Helper's url_is(). |
59 | | - * Keys are routes; values are an array of any of the following: |
60 | | - * - Bundle class names |
61 | | - * - File paths (relative to $directory) |
62 | | - * - URLs |
63 | | - * |
64 | | - * Example: |
65 | | - * $routes = [ |
66 | | - * '*' => [ |
67 | | - * 'https://pagecdn.io/lib/cleave/1.6.0/cleave.min.js', |
68 | | - * \App\Bundles\Bootstrap::class, |
69 | | - * ], |
70 | | - * 'admin/*' => [ |
71 | | - * \Tatter\Frontend\Bundles\AdminLTE::class, |
72 | | - * 'admin/login.js', |
73 | | - * ], |
74 | | - * ]; |
75 | | - * |
76 | | - * @var array<string,string[]> |
77 | | - */ |
78 | | - public $routes = []; |
| 58 | + /** |
| 59 | + * Assets to apply to each route. Routes may use * as a wildcard to |
| 60 | + * allow any valid character, similar to URL Helper's url_is(). |
| 61 | + * Keys are routes; values are an array of any of the following: |
| 62 | + * - Bundle class names |
| 63 | + * - File paths (relative to $directory) |
| 64 | + * - URLs |
| 65 | + * |
| 66 | + * Example: |
| 67 | + * $routes = [ |
| 68 | + * '*' => [ |
| 69 | + * 'https://pagecdn.io/lib/cleave/1.6.0/cleave.min.js', |
| 70 | + * \App\Bundles\Bootstrap::class, |
| 71 | + * ], |
| 72 | + * 'admin/*' => [ |
| 73 | + * \Tatter\Frontend\Bundles\AdminLTE::class, |
| 74 | + * 'admin/login.js', |
| 75 | + * ], |
| 76 | + * ]; |
| 77 | + * |
| 78 | + * @var array<string,string[]> |
| 79 | + */ |
| 80 | + public $routes = []; |
79 | 81 | } |
0 commit comments