-
Type: New Feature
-
Resolution: Unresolved
-
Priority: Unknown
-
None
-
Affects Version/s: None
-
Component/s: GridFS
-
None
PHPLIB-1220 introduced codec support for GridFS buckets. Since GridFS documents are always of the same type with only metadata changing depending on the application's needs, we should consider introducing a GridFSFile class with a corresponding codec. The class would map readonly properties (or getters depending on the targeted PHP version) of GridFS file documents (see the "Files collection document" in the GridFS specification). The GridFSFileCodec class would take an optional DocumentCodec that handles the metadata field.
The class and codec would give users quicker access to handling GridFS files using codecs.