public function addMetadata(ClassMetadata $metadata) { $this->metadatas[$metadata->getClassName()] = $metadata; }