[TASK] Improve ApiUtility mapping handling
This commit is contained in:
parent
4b78ff8eaf
commit
3dbd981f97
@ -93,15 +93,18 @@ class ApiUtility
|
|||||||
) {
|
) {
|
||||||
$rowResult[$attributeName] = $methodResult;
|
$rowResult[$attributeName] = $methodResult;
|
||||||
}
|
}
|
||||||
if (array_key_exists($rowClass, $mapping)
|
}
|
||||||
&& array_key_exists($attributeName, $mapping[$rowClass])
|
// ---
|
||||||
) {
|
if (array_key_exists($rowClass, $mapping)) {
|
||||||
$mappingFunction = $mapping[$rowClass][$attributeName];
|
foreach ($mapping[$rowClass] as $attributeName => $function) {
|
||||||
$rowResult[$attributeName] = $mappingFunction(
|
$rowResult[$attributeName] = $function(
|
||||||
$methodResult,
|
$rowResult[$attributeName],
|
||||||
$row
|
$row
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
// ---
|
||||||
|
foreach ($propertieResults as $attributeName => $methodResult) {
|
||||||
if (gettype($methodResult) == 'object'
|
if (gettype($methodResult) == 'object'
|
||||||
&& get_class($methodResult) == 'DateTime'
|
&& get_class($methodResult) == 'DateTime'
|
||||||
) {
|
) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user