public function __construct(array $typeMappings = []) { foreach ($typeMappings as $mapping) { $this->register($mapping); } }