private function setMap(array $map)
    {
        // Resets (overwrites) map.
        $this->map = [];
        foreach ($map as $type => $className) {
            $this->addClassToMap($type, $className);
        }
        return $this;
    }
private function setMap(array $map)
    {
        // Resets (overwrites) map.
        $this->map = [];
        foreach ($map as $type => $className) {
            $this->addClassToMap($type, $className);
        }
        return $this;
    }
private function setMap ( array $ map ) { // Resets (overwrites) map. $ this -> map = [ ] ; foreach ( $ map as $ type => $ className ) { $ this -> addClassToMap ( $ type , $ className ) ; } return $ this ; }
Add multiple types, in a an array of `type` => `className`.

@param string[] $map The map (key=>classname) to use.
@return self
Add multiple types in a an array of type = > className .