public function createContext($schemaFilePath, $name, $namespace, $directory) { $schema = $this->serializer->deserialize(file_get_contents($schemaFilePath), 'Joli\\Jane\\Model\\JsonSchema', 'json'); $classes = $this->chainGuesser->guessClass($schema, $name); foreach ($classes as $class) { $properties = $this->chainGuesser->guessProperties($class->getObject(), $name, $classes); foreach ($properties as $property) { $property->setType($this->chainGuesser->guessType($property->getObject(), $property->getName(), $classes)); } $class->setProperties($properties); } return new Context($schema, $namespace, $directory, $classes); }