Example #1
0
 /**
  * @param string $content
  * @param bool $checkIntegrity
  * @return \Smalot\Edi\Sef\Sef
  */
 public static function parse($content, $checkIntegrity = true)
 {
     $sections = self::parseSections($content);
     $parser = new self($sections);
     if ($checkIntegrity) {
         $parser->checkIntegrity();
     }
     $schema = new Sef($parser->extractVersion());
     $schema->setIniSection($parser->extractIniSection());
     $schema->setStdSection($parser->extractStdSection());
     $schema->setSetsSection($parser->extractSetsSection());
     $schema->setSegsSection($parser->extractSegsSection());
     return $schema;
 }