Skip to content
Snippets Groups Projects
Commit 7b924bec authored by hahn's avatar hahn
Browse files

- docs - Seite hinzugefuegt

parent 04f5162d
No related branches found
No related tags found
No related merge requests found
......@@ -3,28 +3,45 @@
IML DEPLOYMENT
webgui - doc ... UNUSED so far
webgui - doc
---------------------------------------------------------------------
2013-11-08 Axel <axel.hahn@iml.unibe.ch>
2013-11-19 Axel <axel.hahn@iml.unibe.ch>
###################################################################### */
require_once("./classes/classinfos.class.php");
$aClasses=array(
"project"=>"project",
"projectlist"=>"projectlist",
"project"=>array("name"=>"project", "info" => "Projekte-Klasse. Alle Aktionen zum Lesen/ Builden/ Deployen/ ... eines Projektes als auch Rendering Funktionen für die Webgui."),
"projectlist"=>array("name"=>"projectlist", "info" => "Genrieren der Projektübersicht (kann ggf. gelöscht werden)"),
"page"=>array("name"=>"Page", "info" => "Abstraktion des Http Response der Webgui"),
"formgen"=>array("name"=>"formgen", "info" => "Zeichnen von FORM Elementen"),
);
$sClass=$sPrj;
$sPhpOut='';
foreach ($aClasses as $sClassfile=>$sName){
$sPhpOut.='<a href="/deployment/'.$sClassfile.'/doc/">'.$sClassfile.'</a> | ';
$sPhpOut.='<a href="/deployment/all/doc/">Start</a> | ';
foreach ($aClasses as $sClassfile=>$aInfos){
$sPhpOut.='<a href="/deployment/all/doc/'.$sClassfile.'/">'.$sClassfile.'</a> | ';
}
$sPhpOut.= '<hr>';
if (array_key_exists("par3", $aParams)) {
$sClass=$aParams["par3"];
if (!array_key_exists($sClass, $aClasses)){
$sPhpOut.= getBox("error", "Die Doku kann nicht angezeigt werden. Eine Klasse &quot;$sClass&quot; ist nicht konfiguriert in ". __FILE__ .".");
} else {
require_once("./classes/$sClass.class.php");
$o=new classinfos($sPrj);
$sPhpOut.=$o->render();
$o=new classinfos($aClasses[$sClass]["name"]);
$sPhpOut.=$aClasses[$sClass]["info"] . $o->render();
}
} else {
$sPhpOut.='Wähle eine Klasse.<ul>';
foreach ($aClasses as $sClassfile=>$aInfos){
$sPhpOut.='<li>'
. '<a href="/deployment/all/doc/'.$sClassfile.'/">'.$sClassfile.'</a>'
. ' ' . $aInfos["info"]
. '</li>';
}
$sPhpOut.='</ul>';
}
?>
......@@ -72,6 +72,7 @@ class classinfos {
foreach($aTags as $sKey){
$sReturn=preg_replace('/\@('.$sKey.')/U', '<span class="doctag">@'.$sKey.'</span>', $sReturn);
}
return $sReturn;
return $sReturn='<div class="comment">'. $sReturn . '</div>';
}
......@@ -130,6 +131,7 @@ class classinfos {
<a href="#" class="publicmethodswitch" onclick="$(\'.publicmethodswitch\').toggle(); $(\'.method.private\').show(); return false;">private anzeigen</a>
<br><br>';
}
$sHtml.='<table>';
foreach($this->oRefClass->getMethods() as $o){
$sMethodname=$o->name;
$sType='';
......@@ -140,6 +142,7 @@ class classinfos {
if($o->isAbstract()) $sType.='abstract';
if($o->isFinal()) $sType.='final';
/*
$sHtml.='<div class="method '.$sType.'">';
$sHtml.=$sType . ' <span class="methodname">' .$sMethodname . "</span>(";
$oMethod = $this->oRefClass->getMethod($sMethodname);
......@@ -164,7 +167,35 @@ class classinfos {
$sHtml.=$this->getComment($oMethod);
$sHtml.='</div>';
*/
$sHtml.='<tr class="method '.$sType.'">';
$sHtml.='<td><span class="methodname">' .$sMethodname . '</span></td>'
. '<td>'.$sType . ' </td>'
. '<td><span class="methodname">' .$sMethodname . '</span>(';
$oMethod = $this->oRefClass->getMethod($sMethodname);
$sHtml.='<span class="parameters">' ;
$iCount=0;
$iRequired=$oMethod->getNumberOfRequiredParameters();
foreach($oMethod->getParameters() as $oParam){
$iCount++;
$sHtml.='<span class="';
$sHtml.=$iCount<=$iRequired ? "required":"optional";
$sHtml.='">'. preg_replace('@Parameter\ \#.*\[\ (.*)\ \]@', '$1', $oParam->__toString()).'</span>,';
}
$sHtml=preg_replace('@,$@', "", $sHtml);
$sHtml.="</span>)";
if ($iRequired){
if ($iCount==$iRequired) $sHtml.=' ... all param(s) required';
else $sHtml.=' ... '.$iRequired . ' of '.$iCount.' param(s) required';
}
// $sHtml.='</td><td>';
$sHtml.=$this->getComment($oMethod);
$sHtml.='</td></tr>';
}
$sHtml.='</table>';
$sHtml.='</div>';
return $sHtml;
}
......@@ -278,11 +309,13 @@ class classinfos {
<style>
.classinfo .comment{display:none;}
</style>
<!--
Ansicht:
<ul class="naviH" >
<li class="active"><a href="#" class="viewswitch" onclick="$(\'.naviH >li\').removeClass(\'active\'); $(this.parentNode).addClass(\'active\'); $(\'.comment\').hide(); return false;">einfach</a>
<li><a href="#" class="viewswitch" onclick="$(\'.naviH >li\').removeClass(\'active\'); $(this.parentNode).addClass(\'active\'); $(\'.comment\').show(); return false;">erweitert</a>
</ul>
-->
</span>
<br>';
......
......@@ -110,7 +110,7 @@ function getTopArea() {
$sReturn = '
<div class="navbar">
<div class="navbar-inner">
<a class="brand" href="#">IML Deployment GUI</a>
<span class="brand">IML Deployment GUI</span>
<ul class="nav">
<li>' . aHome("") . '</li>
......@@ -177,6 +177,7 @@ function getTopArea() {
<li><a href="' . $sWikiBaseUrl . '/it/entwicklung/continuous_deployment#konventionen">WIKI: Konventionen für Entwickler</a></li>
<li><a href="' . $sWikiBaseUrl . '/it/infrastruktur/dienste/puppet/snippets#iml-deployment">WIKI (Admin): Puppet-Snippets für den Sysadmin</a></li>
<li><a href="' . $sWikiBaseUrl . '/it/infrastruktur/dienste/imldeployment">WIKI (Admin): Verzeichnisse und Dateien</a></li>
<li><a href="/deployment/all/doc/">verwendete Klassen</a></li>
</ul>
</li>
</ul>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment