/** * Creates a Problem. * @param $type Problem type: 'text', 'equation', ... ? * @param $content An xml string with the problem content. The format depends on the $type. */ public static function create($type, $content) { if ($type == 'text') { return ProblemFactory::createText($content); } throw new Exception("Problem type {$type} is undefined."); }