silverstripe/silverstripe-framework — pull request #3007 by tractorcow (2014-04-04 02:04:32+00:00)
Title: API Singleton method allowing type inference

This pattern improves over the current usage of singleton by allowing type inference.
This also better supports refactor, code usage detection, and auto-completion of classes.

Object::useCustomClass was intentionally avoided here because this method really should be deprecated in favour of using the Injector pattern.