1 | <?php |
||
14 | class SquantoServiceProvider extends BaseServiceProvider |
||
15 | { |
||
16 | protected $defer = true; |
||
17 | |||
18 | /** |
||
19 | * @return array |
||
20 | */ |
||
21 | 1 | public function provides() |
|
31 | |||
32 | /** |
||
33 | * Bootstrap any application services. |
||
34 | * |
||
35 | * @return void |
||
36 | */ |
||
37 | 62 | public function boot() |
|
54 | |||
55 | /** |
||
56 | * Register our translator |
||
57 | * |
||
58 | * @return void |
||
59 | */ |
||
60 | 62 | public function register() |
|
61 | { |
||
62 | 62 | $this->app['squanto.cache_path'] = $this->getSquantoCachePath(); |
|
63 | 62 | $this->app['squanto.lang_path'] = $this->getSquantoLangPath(); |
|
64 | |||
65 | 62 | $this->registerTranslator(); |
|
66 | |||
67 | $this->app->bind(CachedTranslationFile::class, function ($app) { |
||
|
|||
68 | 5 | return new CachedTranslationFile( |
|
69 | 5 | new Filesystem(new Local($this->getSquantoCachePath())) |
|
70 | ); |
||
71 | 62 | }); |
|
72 | |||
73 | $this->app->bind(LaravelTranslationsReader::class, function ($app) { |
||
74 | 5 | return new LaravelTranslationsReader( |
|
75 | 5 | new Filesystem(new Local($this->getSquantoLangPath())) |
|
76 | ); |
||
77 | 62 | }); |
|
78 | |||
79 | 62 | $this->mergeConfigFrom(__DIR__.'/../config/squanto.php', 'squanto'); |
|
80 | 62 | } |
|
81 | |||
82 | 62 | private function registerTranslator() |
|
101 | |||
102 | 62 | private function getSquantoCachePath() |
|
107 | |||
108 | 62 | private function getSquantoLangPath() |
|
113 | } |
||
114 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.