Class JsonFileManager
Tool for reading and writing JSON files.
-
App\Model\FileManager
uses
Nette\SmartObject (not available)
-
App\Model\JsonFileManager
uses
Nette\SmartObject (not available)
Methods summary
public
|
#
__construct( App\Model\string $configDir )
Constructor
Parameters
- $configDir
- Directory with configuration files
Overrides
|
public
array
|
#
read( App\Model\string $fileName )
Read JSON file and decode JSON to array
Read JSON file and decode JSON to array
Parameters
- $fileName
- File name (without .json)
Returns
array
Overrides
|
public
|
#
write( App\Model\string $name, array $array )
Encode JSON from array and write JSON file
Encode JSON from array and write JSON file
Parameters
- $name
- File name (without .json)
- $array
- JSON array
Overrides
|