public static function get($name) { if (!isset(self::$converterMap[$name])) { throw new InvalidArgumentException(sprintf('Attribute converter "%s" is not valid.', $name)); } return self::getInstanceOfConverter($name); }
/** * Get an instance of a converter with its options set. * * @param string $converterName The name of the converter from the schema. * @return AttributeConverterInterface */ protected function getConverterWithOptions($converterName) { $converter = AttributeConverterFactory::get($converterName); if (isset($this->options[$converterName])) { $converter->setOptions($this->options[$converterName]); } if ($this->connection) { $converter->setLdapConnection($this->connection); } if ($this->dn !== null) { $converter->setDn($this->dn); } if ($converter instanceof OperationGeneratorInterface) { $converter->setOperation($this->operation); } $converter->setOperationType($this->type); return $converter; }