Author: Chad Sikorra (Chad.Sikorra@gmail.com)
Beispiel #1
0
 /**
  * Register any explicitly defined converters.
  *
  * @param array $attributeConverters
  */
 protected function registerAttributeConverters(array $attributeConverters)
 {
     foreach ($attributeConverters as $name => $class) {
         AttributeConverterFactory::register($name, $class);
     }
 }
 /**
  * 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;
 }