protected function get_qtype_restorer($qtype) {
        // Build one static cache to store {@link restore_qtype_plugin}
        // while we are needing them, just to save zillions of instantiations
        // or using static stuff that will break our nice API
        static $qtypeplugins = array();

        if (!isset($qtypeplugins[$qtype])) {
            $classname = 'restore_qtype_' . $qtype . '_plugin';
            if (class_exists($classname)) {
                $qtypeplugins[$qtype] = new $classname('qtype', $qtype, $this);
            } else {
                $qtypeplugins[$qtype] = null;
            }
        }
        return $qtypeplugins[$qtype];
    }
protected function get_qtype_restorer($qtype) {
        // Build one static cache to store {@link restore_qtype_plugin}
        // while we are needing them, just to save zillions of instantiations
        // or using static stuff that will break our nice API
        static $qtypeplugins = array();

        if (!isset($qtypeplugins[$qtype])) {
            $classname = 'restore_qtype_' . $qtype . '_plugin';
            if (class_exists($classname)) {
                $qtypeplugins[$qtype] = new $classname('qtype', $qtype, $this);
            } else {
                $qtypeplugins[$qtype] = null;
            }
        }
        return $qtypeplugins[$qtype];
    }
protected function get_qtype_restorer ( $ qtype ) { // Build one static cache to store {@link restore_qtype_plugin} // while we are needing them, just to save zillions of instantiations // or using static stuff that will break our nice API static $ qtypeplugins = array ( ) ; if ( ! isset ( $ qtypeplugins [ $ qtype ] ) ) { $ classname = 'restore_qtype_' . $ qtype . '_plugin' ; if ( class_exists ( $ classname ) ) { $ qtypeplugins [ $ qtype ] = new $ classname ( 'qtype' , $ qtype , $ this ) ; } else { $ qtypeplugins [ $ qtype ] = null ; } } return $ qtypeplugins [ $ qtype ] ; }
Get the restore_qtype_plugin subclass for a specific question type.
@param string $qtype e.g. multichoice.
@return restore_qtype_plugin instance.
Get the restore_qtype_plugin subclass for a specific question type .