Relative Content

Tag Archive for phplaravelamazon-s3design-patterns

Does a Singleton pattern make sense for a generic S3 wrapper class?

I’m trying to create a wrapper for S3. I have a few buckets and the local fs that perform the same operations. I want to achieve something like S3Wrapper::bucket1->upload() to simplify development and also reduce duplicating the same methods for each bucket. Does it make sense to create a Singleton class for the wrapper? I’m new to design patterns so let me know if it doesn’t make sense.