public static function instance()
    {
        if (null === self::$_instance) {
            $capsule = new Capsule;
            $capsule->addConnection(self::getConfig());
            $capsule->setEventDispatcher(new Dispatcher(new Container));
            $capsule->setAsGlobal();

            self::$_instance = $capsule;
        }
        return self::$_instance;
    }