/** * @param array $idConstantsMap * @return array */ private function getIdConstantsByTypeConstantValuesMap(array $idConstantsMap) { $result = []; $flipIdConstantsMap = array_flip($idConstantsMap); $exceptionMap = AppHttpException::getMap(); foreach ($exceptionMap as $typeConstant => $data) { $constants = []; foreach ($data[1] as $value) { $constants[] = $flipIdConstantsMap[$value]; } $result[$typeConstant] = $constants; } return $result; }
?> </td> <td> <?php echo isset($constantDescriptions[$const]) ? $constantDescriptions[$const] : ''; ?> </td> <td> <ul> <?php foreach ($idConstantsByTypeConstantValuesMap[$value] as $idConstant) { ?> <li> <code><?php echo trim(\app\components\exceptions\AppHttpException::getMessageByCode($idConstantsMap[$idConstant])); ?> </code>(<?php echo $idConstant; ?> ) </li> <?php } ?> </ul> </td> </tr> <?php } ?>