Get the name of the converter for an attribute.
public getConverter ( string $attributeName ) : string | ||
$attributeName | string | |
Résultat | string |
/** * Convert a set of values for an attribute. * * @param string $attribute * @param array $values * @param string $direction * @param AttributeConverterInterface|null $converter * @return mixed */ protected function doConvertValues($attribute, array $values, $direction, AttributeConverterInterface $converter = null) { $converter = is_null($converter) ? $this->getConverterWithOptions($this->schema->getConverter($attribute)) : $converter; $converter->setAttribute($attribute); if ($converter->getIsMultiValuedConverter()) { $values = $converter->{$direction}($values); } else { foreach ($values as $index => $value) { $values[$index] = $converter->{$direction}($value); } } return $values; }