Beispiel #1
0
 /**
  * {@inheritdoc}
  *
  * @param string $context
  *    A context, explaining what kind of data this is. Possible contexts:
  *    - EducaCurriculum::CURRICULUM_JSON: Representation of the curriculum
  *      structure, in JSON. This information can be found on the bsn
  *      Ontology server.
  */
 public static function createFromData($data, $context = self::CURRICULUM_JSON)
 {
     switch ($context) {
         case self::CURRICULUM_JSON:
             $data = self::parseCurriculumJson($data);
             $curriculum = new EducaCurriculum($data->curriculum);
             $curriculum->setCurriculumDictionary($data->dictionary);
             return $curriculum;
     }
     // @codeCoverageIgnoreStart
     throw new CurriculumInvalidContextException();
     // @codeCoverageIgnoreEnd
 }