gaillard/mongo-lock-php — pull request #6 by nubs (2014-07-30 13:38:04+00:00)
Title: Convert Locker to be instantiated.

As an instance, the Locker object is able to own the collection.
Calling code can then pass around the Locker without receiving code
being knowledgeable of the underlying mongo collection.

Static methods in PHP are essentially just namespaced global methods -
there is very little different between Locker::readLock() and
Locker\readLock(). These methods are more difficult to use: they can't
be passed around easily, they require the shared parameters ($collection
in this case) to be kept and available for passing everywhere the method
needs to be called, and are more frustrating to mock in tests if they
can be mocked at all.