public static function register($name, $class) { if (isset(self::$converterMap[$name])) { throw new InvalidArgumentException(sprintf('The attribute converter name "%s" is already registered.', $name)); } self::$converterMap[$name] = $class; }
/** * Register any explicitly defined converters. * * @param array $attributeConverters */ protected function registerAttributeConverters(array $attributeConverters) { foreach ($attributeConverters as $name => $class) { AttributeConverterFactory::register($name, $class); } }