Thanks to PHP’s namespaces we can now use Monkey Patching within our projects. In this post there’s a practical example of this feature. We’re going to override the standard behaviour of PHP’s filesystem functions to store files into a CouchDb database as attachments without rewriting our code. Only setting up a namespace.