Goetas\Xsd\XsdToPhp\Tests\JmsSerializer\OTA\AnyTypePHPConversionTest::getYamlFiles PHP Méthode

getYamlFiles() protected méthode

protected getYamlFiles ( mixed $xml, array $types = [] ) : array[]
$xml mixed
$types array
Résultat array[]
    protected function getYamlFiles($xml, array $types = array())
    {
        $creator = new YamlConverter(new ShortNamingStrategy());
        $creator->addNamespace('', 'Example');
        foreach ($types as $typeData) {
            list($ns, $name, $type) = $typeData;
            $creator->addAliasMapType($ns, $name, $type);
        }
        $reader = new SchemaReader();
        if (!is_array($xml)) {
            $xml = ['schema.xsd' => $xml];
        }
        $schemas = [];
        foreach ($xml as $name => $str) {
            $schemas[] = $reader->readString($str, $name);
        }
        $items = $creator->convert($schemas);
        return $items;
    }