protected getFileContents ( string $file ) : array | ||
$file | string | |
Результат | array |
protected function getFileContents($file)
{
$filePath = $this->directory . '/' . $file;
if (!file_exists($filePath)) {
throw new InvalidArgumentException("The file [{$filePath}] does not exist.");
}
return json_decode(file_get_contents($filePath), true);
}