PluginProbe
Metricool – Social media and site statistics / 2.1.1
Metricool – Social media and site statistics v2.1.1
2.1.1 2.1.0 2.0.2 2.0.1 2.0.0 1.27 trunk
metricool / app / Support / Helpers / Storages / LanguagesConfig.php

LanguagesConfig.php in Metricool – Social media and site statistics 2.1.1, at app/Support/Helpers/Storages/LanguagesConfig.php

44 lines 965 B
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2
3 declare(strict_types=1);
4
5 namespace Metricool\Support\Helpers\Storages;
6
7 use Metricool\Support\Helpers\DeferredObject;
8 use Metricool\Support\Helpers\Storage;
9
10 /**
11 * Environment configuration helper used in DI container.
12 *
13 * @mixin Storage This class acts as a proxy to Storage. All method calls are
14 * resolved dynamically through {@see DeferredObject::__get()}
15 */
16 final class LanguagesConfig extends DeferredObject
17 {
18 /**
19 * @inheritDoc
20 */
21 protected function deferredClassString(): string
22 {
23 return Storage::class;
24 }
25
26 /**
27 * @inheritDoc
28 */
29 protected function deferredConstructArguments(): array
30 {
31 return [
32 'items' => $this->getStorageItems(),
33 ];
34 }
35
36 /**
37 * Method automatically resolves the environment configuration file.
38 */
39 private function getStorageItems(): array
40 {
41 return require dirname(__FILE__, 5) . '/config/languages.php';
42 }
43 }
44