22 private $definitionProcessors;
31 $this->definitionProcessors = $definitionProcessors;
40 if (!isset($this->definitionProcessors[
$type])) {
41 throw new \InvalidArgumentException(
42 sprintf(
"Cannot process object to definition for type %s",
$type)
46 $definitionProcessor = $this->definitionProcessors[
$type];
47 return $definitionProcessor->toDefinition($column);
56 if (!isset($this->definitionProcessors[
$type])) {
57 throw new \InvalidArgumentException(
58 sprintf(
"Cannot process definition to array for type %s",
$type)
62 $definitionProcessor = $this->definitionProcessors[
$type];
63 return $definitionProcessor->fromDefinition(
$data);
__construct(array $definitionProcessors)
toDefinition(ElementInterface $column)
fromDefinition(array $data)