@@ 63-65 (lines=3) @@ | ||
60 | */ |
|
61 | public function getFiled($entityName, $attribute) |
|
62 | { |
|
63 | if (!isset($this->entityMap[$entityName]['columnsAsAttributesMap'])) { |
|
64 | throw new ConfigException(sprintf("entity_map[columnsAsAttributesMap] not configured for %s", $entityName)); |
|
65 | } |
|
66 | ||
67 | $field = array_search($attribute, $this->entityMap[$entityName]['columnsAsAttributesMap']); |
|
68 | ||
@@ 168-172 (lines=5) @@ | ||
165 | */ |
|
166 | public function getColumnsAsAttributesMap($entityName) |
|
167 | { |
|
168 | if (!isset($this->entityMap[$entityName]['columnsAsAttributesMap'])) { |
|
169 | throw new ConfigException( |
|
170 | sprintf("entity_map[columnsAsAttributesMap] not configured for %s", $entityName) |
|
171 | ); |
|
172 | } |
|
173 | ||
174 | if (!is_array($this->entityMap[$entityName]['columnsAsAttributesMap'])) { |
|
175 | throw new ConfigException( |
|
@@ 174-178 (lines=5) @@ | ||
171 | ); |
|
172 | } |
|
173 | ||
174 | if (!is_array($this->entityMap[$entityName]['columnsAsAttributesMap'])) { |
|
175 | throw new ConfigException( |
|
176 | sprintf("entity_map[columnsAsAttributesMap] for %s must be array", $entityName) |
|
177 | ); |
|
178 | } |
|
179 | ||
180 | return $this->entityMap[$entityName]['columnsAsAttributesMap']; |
|
181 | } |