|
@@ 37-39 (lines=3) @@
|
| 34 |
|
*/ |
| 35 |
|
public function getFiled($entityName, $attribute) |
| 36 |
|
{ |
| 37 |
|
if (!isset($this->entityMap[$entityName]['columnsAsAttributesMap'])) { |
| 38 |
|
throw new ConfigException(sprintf("entity_map[columnsAsAttributesMap] not configured for %s", $entityName)); |
| 39 |
|
} |
| 40 |
|
|
| 41 |
|
$field = array_search($attribute, $this->entityMap[$entityName]['columnsAsAttributesMap']); |
| 42 |
|
|
|
@@ 140-144 (lines=5) @@
|
| 137 |
|
*/ |
| 138 |
|
public function getColumnsAsAttributesMap($entityName) |
| 139 |
|
{ |
| 140 |
|
if (!isset($this->entityMap[$entityName]['columnsAsAttributesMap'])) { |
| 141 |
|
throw new ConfigException( |
| 142 |
|
sprintf("entity_map[columnsAsAttributesMap] not configured for %s", $entityName) |
| 143 |
|
); |
| 144 |
|
} |
| 145 |
|
|
| 146 |
|
if (!is_array($this->entityMap[$entityName]['columnsAsAttributesMap'])) { |
| 147 |
|
throw new ConfigException( |
|
@@ 146-150 (lines=5) @@
|
| 143 |
|
); |
| 144 |
|
} |
| 145 |
|
|
| 146 |
|
if (!is_array($this->entityMap[$entityName]['columnsAsAttributesMap'])) { |
| 147 |
|
throw new ConfigException( |
| 148 |
|
sprintf("entity_map[columnsAsAttributesMap] for %s must be array", $entityName) |
| 149 |
|
); |
| 150 |
|
} |
| 151 |
|
|
| 152 |
|
return $this->entityMap[$entityName]['columnsAsAttributesMap']; |
| 153 |
|
} |