@@ 50-52 (lines=3) @@ | ||
47 | */ |
|
48 | public function getFiled($entityName, $attribute) |
|
49 | { |
|
50 | if (!isset($this->entityMap[$entityName]['columnsAsAttributesMap'])) { |
|
51 | throw new ConfigException(sprintf("entity_map[columnsAsAttributesMap] not configured for %s", $entityName)); |
|
52 | } |
|
53 | ||
54 | $field = array_search($attribute, $this->entityMap[$entityName]['columnsAsAttributesMap']); |
|
55 | ||
@@ 155-159 (lines=5) @@ | ||
152 | */ |
|
153 | public function getColumnsAsAttributesMap($entityName) |
|
154 | { |
|
155 | if (!isset($this->entityMap[$entityName]['columnsAsAttributesMap'])) { |
|
156 | throw new ConfigException( |
|
157 | sprintf("entity_map[columnsAsAttributesMap] not configured for %s", $entityName) |
|
158 | ); |
|
159 | } |
|
160 | ||
161 | if (!is_array($this->entityMap[$entityName]['columnsAsAttributesMap'])) { |
|
162 | throw new ConfigException( |
|
@@ 161-165 (lines=5) @@ | ||
158 | ); |
|
159 | } |
|
160 | ||
161 | if (!is_array($this->entityMap[$entityName]['columnsAsAttributesMap'])) { |
|
162 | throw new ConfigException( |
|
163 | sprintf("entity_map[columnsAsAttributesMap] for %s must be array", $entityName) |
|
164 | ); |
|
165 | } |
|
166 | ||
167 | return $this->entityMap[$entityName]['columnsAsAttributesMap']; |
|
168 | } |