code: public static function fromArray(iterable $config, string $urlPrefix = null): self
      {
          return new self(
              ...collect($config)->map(function ($value, $key) use ($urlPrefix) {
                  return Encoding::fromArray($key, $value, $urlPrefix);
              })->values()
          );
      }
docs: Create encodings from array config.
  
  @param iterable $config
  @param string|null $urlPrefix
  @return EncodingList