本文整理汇总了PHP中Requirement::sourcesReq方法的典型用法代码示例。如果您正苦于以下问题:PHP Requirement::sourcesReq方法的具体用法?PHP Requirement::sourcesReq怎么用?PHP Requirement::sourcesReq使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Requirement
的用法示例。
在下文中一共展示了Requirement::sourcesReq方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: download_tex
public function download_tex()
{
if (!isset($_SESSION['logged'])) {
$this->login();
} else {
$rs = Requirement::reqSources();
$sr = Requirement::sourcesReq();
$frq = Requirement::functionalRequirements();
$tex = "\\section{Requisiti funzionali}<br>\n \\begin{longtable}[H]{|l|p{2cm}|p{6cm}|p{4cm}|}<br>\n \\hline<br>\n \\textbf{Requisito} & \\textbf{Tipologia} & \\textbf{Descrizione} & \\textbf{Fonti}\\\\<br>\n \\hline<br>";
foreach ($frq as $funcReq) {
if ($funcReq->getType() == 'F') {
$type = 'Funzionale';
} elseif ($funcReq->getType() == 'T') {
$type = 'Tecnologico';
} elseif ($funcReq->getType() == 'Q') {
$type = 'Qualitativo';
} elseif ($funcReq->getType() == 'B') {
$type = 'Vincolo';
}
$tex .= $funcReq->getCode() . " & \\multiLineCell{" . $type . "\\\\" . $funcReq->getPriority() . "} & " . $funcReq->getDescription() . " & \\multiLineCell{";
foreach ($funcReq->getSources() as $sources) {
$tex .= $sources->getName() . "\\\\";
}
$tex .= "}\\\\<br>\n \\hline<br>";
}
$tex .= "\\end{longtable}<br>";
$tex .= "\\section{Tracciamento Requisiti-Fonti}<br>\n \\begin{longtable}[H]{|p{5.5cm}|p{5.5cm}|}<br>\n \\hline<br>\n \\textbf{Requisito} & \\textbf{Fonti}\\\\<br>\n \\hline<br>";
foreach ($rs as $key => $val) {
$tex .= $key . " & \\multiLineCell[t]{";
foreach ($val as $v) {
$tex .= $v . "\\\\";
}
$tex .= "}\\\\<br>\n \\hline<br>";
}
$tex .= "\\end{longtable}<br>\n \\section{Tracciamento Fonti-Requisiti}<br>\n \\begin{longtable}[H]{|p{5.5cm}|p{5.5cm}|}<br>\n \\hline<br>\n \\textbf{Fonte} & \\textbf{Requisiti}\\\\<br>\n \\hline<br>";
foreach ($sr as $key => $val) {
$tex .= $key . " & \\multiLineCell[t]{";
foreach ($val as $v) {
$tex .= $v . "\\\\";
}
$tex .= "}\\\\<br>\n \\hline<br>";
}
$tex .= "\\end{longtable}<br>";
require_once 'views/pages/output.php';
}
}