final public static function engage_independent_stage($stage, $contextid) {
        if (!($stage & self::STAGE_CONFIRM + self::STAGE_DESTINATION)) {
            throw new restore_ui_exception('dependentstagerequested');
        }
        $class = 'restore_ui_stage_'.self::$stages[$stage];
        if (!class_exists($class)) {
            throw new restore_ui_exception('unknownuistage');
        }
        return new $class($contextid);
    }
final public static function engage_independent_stage($stage, $contextid) {
        if (!($stage & self::STAGE_CONFIRM + self::STAGE_DESTINATION)) {
            throw new restore_ui_exception('dependentstagerequested');
        }
        $class = 'restore_ui_stage_'.self::$stages[$stage];
        if (!class_exists($class)) {
            throw new restore_ui_exception('unknownuistage');
        }
        return new $class($contextid);
    }
final public static function engage_independent_stage ( $ stage , $ contextid ) { if ( ! ( $ stage & self :: STAGE_CONFIRM + self :: STAGE_DESTINATION ) ) { throw new restore_ui_exception ( 'dependentstagerequested' ) ; } $ class = 'restore_ui_stage_' . self :: $ stages [ $ stage ] ; if ( ! class_exists ( $ class ) ) { throw new restore_ui_exception ( 'unknownuistage' ) ; } return new $ class ( $ contextid ) ; }
Initialised the requested independent stage

@throws restore_ui_exception
@param int $stage One of self::STAGE_*
@param int $contextid
@return restore_ui_stage_confirm|restore_ui_stage_destination
Initialised the requested independent stage