Exemple #1
0
 public static function build($options = [])
 {
     $serializer = self::buildSerializer();
     $chainGuesser = JsonSchemaGuesserFactory::create($serializer, $options);
     $naming = new Naming();
     $modelGenerator = new ModelGenerator($naming, $chainGuesser, $chainGuesser);
     $normGenerator = new NormalizerGenerator($naming, isset($options['reference']) ? $options['reference'] : true);
     return new self($serializer, $chainGuesser, $modelGenerator, $normGenerator);
 }
Exemple #2
0
 public static function build()
 {
     $serializer = self::buildSerializer();
     $chainGuesser = JsonSchemaGuesserFactory::create($serializer);
     $naming = new Naming();
     $modelGenerator = new ModelGenerator($naming, $chainGuesser, $chainGuesser);
     $normGenerator = new NormalizerGenerator($naming);
     return new self($serializer, $chainGuesser, $modelGenerator, $normGenerator);
 }