class JsonParsedDataStorage implements ParsedDataPersistentStorageProvider (View source)

JSON storage for parsed entities.

Handles file I/O operations while delegating serialization to a pluggable serializer. Optionally coordinates with PhpDocStorage for separated PhpDoc storage.

Methods

__construct(string $pathToJsonFile, EntitySerializerInterface $serializer, bool $loadExisting = true, PhpDocStorage|null $phpDocStorage = null, bool $ownsPhpDocStorage = true)

No description

array
getEntities()

No description

void
addEntity(mixed $entity)

No description

void
clearEntities()

No description

void
save()

Save entities to persistent storage

void
load()

Load entities from persistent storage

Details

__construct(string $pathToJsonFile, EntitySerializerInterface $serializer, bool $loadExisting = true, PhpDocStorage|null $phpDocStorage = null, bool $ownsPhpDocStorage = true)

No description

Parameters

string $pathToJsonFile

Path to JSON file

EntitySerializerInterface $serializer

Serializer to use (StubsEntitySerializer or ReflectionEntitySerializer)

bool $loadExisting

Whether to load existing file

PhpDocStorage|null $phpDocStorage

Optional PhpDoc storage for separated PhpDoc

bool $ownsPhpDocStorage

Whether this storage is responsible for saving PhpDocStorage

array getEntities()

No description

Return Value

array

void addEntity(mixed $entity)

No description

Parameters

mixed $entity

Return Value

void

void clearEntities()

No description

Return Value

void

void save()

Save entities to persistent storage

Return Value

void

void load()

Load entities from persistent storage

Return Value

void