function component_row(Package $component, $indentation, TableCreator $table_creator) { $req_id = array(); $component->with('requirements'); foreach ($component->requirements as $rq) { array_push($req_id, $table_creator->link($rq->public_id(), $rq->public_id())); } array_unique($req_id); $cells = array($table_creator->child_indentation($indentation), $table_creator->link($component->full_name(), $component->full_name("::\\-")), implode("\n\n", $req_id)); $ret = $table_creator->row($cells); $nested = $component->with('packages')->packages; foreach ($nested as $nuc) { $ret .= component_row($nuc, $indentation + 1, $table_creator); } return $ret; }
function component_row(Package $package, $indentation, TableCreator $table_creator) { $ret = $table_creator->row(array($package->full_name(), $package->afferente(), $package->efferente(), round($package->instability(), 2))); $nested = $package->with('packages')->packages; foreach ($nested as $nuc) { $ret .= component_row($nuc, $indentation + 1, $table_creator); } return $ret; }
function component_row(Package $package, $indentation, TableCreator $table_creator) { $package->with('integration'); $ret = $table_creator->row(array($package->full_name(), $package->integration == null ? 'Architettura del sistema' : $package->integration->public_id())); $nested = $package->with('packages')->packages; foreach ($nested as $nuc) { $ret .= component_row($nuc, $indentation + 1, $table_creator); } return $ret; }