Manual:DBConnRef.php

Helper class used for automatically marking an IDatabase connection as reusable (once it no longer matters which DB domain is selected) and for deferring the actual network connection. This uses an RAII-style pattern where calling code is expected to keep the returned reference handle as a function variable that falls out of scope when no longer needed. This avoids the need for matching reuseConnection() calls for every "return" statement as well as the tedious use of try/finally.

Implements

edit