當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Requirement::functionalRequirements方法代碼示例

本文整理匯總了PHP中Requirement::functionalRequirements方法的典型用法代碼示例。如果您正苦於以下問題:PHP Requirement::functionalRequirements方法的具體用法?PHP Requirement::functionalRequirements怎麽用?PHP Requirement::functionalRequirements使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Requirement的用法示例。


在下文中一共展示了Requirement::functionalRequirements方法的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';
     }
 }
開發者ID:ScalateKids,項目名稱:Scalatetrack,代碼行數:46,代碼來源:pages_controller.php


注:本文中的Requirement::functionalRequirements方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。