/** * Connect object properties by chaining it like a.b.c... * @param $sPropertyChain * @param $oObject * @return bool */ public static function property_chain($sPropertyChain, $oObject) { $sPropertyChain = explode('.', $sPropertyChain); foreach ($sPropertyChain as $sElement) { $oObject = Objects::property($sElement, $oObject); if (!$oObject) { return false; } } return $oObject; }
?> </td> <?php } else { ?> <td> <a href="<?php echo Arrays::element_chain($key . '.prefix', $tableLinks); if (is_array($row)) { if (Arrays::element_chain(Arrays::element_chain($key . '.field', $tableLinks), $row)) { echo Arrays::element(Arrays::element_chain($key . '.field', $tableLinks), $row); } } else { if (is_object($row)) { if (Objects::property(Arrays::element_chain($key . '.field', $tableLinks), $row)) { echo Objects::property(Arrays::element_chain($key . '.field', $tableLinks), $row); } } } echo Arrays::element_chain($key . '.suffix', $tableLinks); ?> "><?php echo $convertedValue; ?> </a></td> <?php } ?> <?php } ?>