Store
class Store
Methods
Create a new store instance.
Add a file to the store.
Resolve the ID of the file a document was imported from, which Gemini does not reuse as the document ID.
Get the file provider, using a fake gateway if files are faked.
Remove a document from the store.
Delete the store from the provider.
Get a callback for matching file assertions on this store.
Determine if the given file matches the expected file ID.
Details
at line 23
__construct(FileProvider&StoreProvider $provider, string $id, string|null $name, StoreFileCounts $fileCounts, bool $ready)
Create a new store instance.
at line 35
AddedDocumentResponse
add(StorableFile|UploadedFile|HasProviderId|string $file, array $metadata = [])
Add a file to the store.
at line 65
protected string
fileIdFor(HasProviderId|string $documentId)
Resolve the ID of the file a document was imported from, which Gemini does not reuse as the document ID.
at line 77
protected HasProviderId
storeFile(StorableFile $file)
Store the given file with the provider.
at line 85
protected FileProvider
fakeableFileProvider()
Get the file provider, using a fake gateway if files are faked.
at line 96
bool
remove(HasProviderId|string $documentId, bool $deleteFile = false)
Remove a document from the store.
at line 110
Store
refresh()
Refresh the store from the provider.
at line 118
bool
delete()
Delete the store from the provider.
at line 136
Store
assertNotAdded(Closure|string $fileId)
Assert that a file was not added to the store.
at line 146
Store
assertRemoved(Closure|string $documentId)
Assert that a document was removed from the store.
at line 156
Store
assertNotRemoved(Closure|string $documentId)
Assert that a document was not removed from the store.
at line 166
protected Closure
fileAssertionCallback(Closure|string $fileId)
Get a callback for matching file assertions on this store.
at line 178
protected bool
fileIdMatches(StorableFile|HasProviderId|string $file, string $expectedFileId)
Determine if the given file matches the expected file ID.