if (isset($yaml['discriminator_map'
])) { if (!
isset($yaml['discriminator_map'
]['type_property'
])) { throw new MappingException(sprintf('The "type_property" key must be set for the discriminator map of the class "%s" in "%s".',
$classMetadata->
getName(),
$this->file
));
} if (!
isset($yaml['discriminator_map'
]['mapping'
])) { throw new MappingException(sprintf('The "mapping" key must be set for the discriminator map of the class "%s" in "%s".',
$classMetadata->
getName(),
$this->file
));
} $classMetadata->
setClassDiscriminatorMapping(new ClassDiscriminatorMapping( $yaml['discriminator_map'
]['type_property'
],
$yaml['discriminator_map'
]['mapping'
] ));
} return true;
} /**
* Return the names of the classes mapped in this file.
*
* @return string[]
*/