|
MediaWiki master
|
JsonLoader. More...
Public Member Functions | |
| __construct (private readonly LoggerInterface $logger,) | |
| Initializes the JsonLoader with a logger. | |
| load (string $filePath, string $context='', bool $allowMissing=false) | |
| Loads and decodes a JSON file. | |
JsonLoader.
Provides methods for loading and decoding JSON files with caching.
Definition at line 20 of file JsonLoader.php.
| Wikimedia\Leximorph\Util\JsonLoader::__construct | ( | private readonly LoggerInterface | $logger | ) |
Initializes the JsonLoader with a logger.
| LoggerInterface | $logger |
Definition at line 29 of file JsonLoader.php.
| Wikimedia\Leximorph\Util\JsonLoader::load | ( | string | $filePath, |
| string | $context = '', | ||
| bool | $allowMissing = false ) |
Loads and decodes a JSON file.
| string | $filePath | The path to the JSON file. |
| string | $context | A short string to include in log messages. |
| bool | $allowMissing | If true, suppress error logging for missing/unreadable files. |
Definition at line 44 of file JsonLoader.php.