<?php
# application/middleware/TestMiddleware.php

class Auth_conn implements Luthier\MiddlewareInterface
{
    public function run($args = '')
    {
        if ($args) {
            ci()->db->close();
            ci()->load->database($args);
            return;
        } else {
            return redirect(route('page.not.found'));
        }
    }
}
