original_string: 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];
      }
code: 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];
      }
code_tokens: 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 ] ; }
docstring: Get the restore_qtype_plugin subclass for a specific question type.
  @param string $qtype e.g. multichoice.
  @return restore_qtype_plugin instance.
docstring_tokens: Get the restore_qtype_plugin subclass for a specific question type .