public static function setInstance($instance)
    {
        if ($instance instanceof self) {
            self::$instance = $instance;
        } elseif (is_array($instance)) {
            self::$instance = new self($instance);
        } else {
            $message = 'Argument 1 passed to Storage::setInstance must be '.
                'an instance of go\DB\DB or array, '.gettype($instance).' given';
            trigger_error($message, E_USER_ERROR);
        }
        return self::$instance;
    }
public static function setInstance($instance)
    {
        if ($instance instanceof self) {
            self::$instance = $instance;
        } elseif (is_array($instance)) {
            self::$instance = new self($instance);
        } else {
            $message = 'Argument 1 passed to Storage::setInstance must be '.
                'an instance of go\DB\DB or array, '.gettype($instance).' given';
            trigger_error($message, E_USER_ERROR);
        }
        return self::$instance;
    }
public static function setInstance ( $ instance ) { if ( $ instance instanceof self ) { self :: $ instance = $ instance ; } elseif ( is_array ( $ instance ) ) { self :: $ instance = new self ( $ instance ) ; } else { $ message = 'Argument 1 passed to Storage::setInstance must be ' . 'an instance of go\DB\DB or array, ' . gettype ( $ instance ) . ' given' ; trigger_error ( $ message , E_USER_ERROR ) ; } return self :: $ instance ; }
Sets a storage instance as main

@param mixed $instance
a storage instance or its parameters
@return \go\DB\Storage
@todo why trigger_error() instead exception?
Sets a storage instance as main