DefaultInventoryLoader
in package
implements
InventoryLoader
FinalYes
Table of Contents
Interfaces
Properties
- $anchorReducer : AnchorNormalizer
- $jsonLoader : JsonLoader
- $logger : LoggerInterface
- $pathToJson : string
Methods
- __construct() : mixed
- loadInventory() : void
- loadInventoryFromJson() : void
Properties
$anchorReducer read-only
private
AnchorNormalizer
$anchorReducer
$jsonLoader read-only
private
JsonLoader
$jsonLoader
$logger read-only
private
LoggerInterface
$logger
$pathToJson read-only
private
string
$pathToJson
= 'objects.inv.json'
Methods
__construct()
public
__construct(LoggerInterface $logger, JsonLoader $jsonLoader, AnchorNormalizer $anchorReducer[, string $pathToJson = 'objects.inv.json' ]) : mixed
Parameters
- $logger : LoggerInterface
- $jsonLoader : JsonLoader
- $anchorReducer : AnchorNormalizer
- $pathToJson : string = 'objects.inv.json'
loadInventory()
public
loadInventory(Inventory $inventory) : void
Parameters
- $inventory : Inventory
loadInventoryFromJson()
public
loadInventoryFromJson(Inventory $inventory, array<string, mixed> $json) : void
Parameters
- $inventory : Inventory
- $json : array<string, mixed>