<?php
$xml = simplexml_load_file($xml_dir.$_GET['class']);
$class_name = $xml->class['name'];
$class_description = $xml->class->description;
echo "<h1>$class_name</h1>";
echo "<div>$class_description</div>";
echo "<h2>Métodos da classe</h2>";
echo "<ul>";
$methods = $xml->class->methods;
foreach($methods as $method)
{
foreach($method as $function)
{
$method_name = $function['name'];
//$method_visibility = $function['visibility'];
//$method_example = $function['example'];
$method_description = $function->description;
echo "<li><a href='?class={$_GET['class']}&method=$method_name'>$method_name</a>: $method_description</li>";
/*echo "<h3>$method_visibility $method_name</h3>";
echo "<div>$method_description</div>";
echo "<h5>Parâmetros do método</h5>";
$params = $function->params;
foreach($params as $param)
{
foreach($param as $parameter)
{
$param_name = $parameter['name'];
$param_type = $parameter['type'];
$param_name = $parameter['name'];
$param_optional = $parameter['optional'];
$param_default = $parameter['default'];
$param_description = $parameter;
if($param_optional == "false")
{
$optional = 'requerido';
}
else
{
$optional = 'opcional';
}
if(strlen($param_default) > 0)
{
$default = "valor padrão: $param_default";
}
else
{
$default = '';
}
echo "<dl>";
echo "<dt>($param_type) $param_name - <i>$optional</i> <i>$default</i></dt>";
echo "<dd>$param_description</dd>";
echo "</dl>";
}
}
echo "<div>";
highlight_file($example_dir.$method_example);
echo "</div>";*/
}
}
echo "</ul>";
?>
|