";
foreach($apiData as $key => $val){
switch($key){
case "#resource" : break;
case "#requires" :
$print .= "
Requires:
";
foreach($val as $resource){
$print .= "
{$resource[1]} in {$resource[0]}";
if ($resource[2]) {
$print .= " in project {$resource[2]}";
}
$print .= "
";
}
$print .= "
";
break;
case "#provides" :
$print .= "
Provides:
";
$print .= "
$val
";
$print .= "
";
break;
default:
$print .= "
".$key."
";
foreach($val as $key2 => $val2){
switch($key2){
// most things using dojo.declare() trigger this, eg: dijits
case "classlike": $knownClasses[] = $key; break;
// these are partially useless for our "overview" api, but set showall=1 in the
// url if you want to see these, too. sortof.
case "type" : $print .= "
".$key2."
".htmlentities($val2)."
"; break;
case "private_parent" :
case "prototype" :
case "instance" :
case "private" :
if($_REQUEST['showall']){ $print .= "
".$key2." - ".$val2."
"; }
break;
// another array we want inspect more closely
case "parameters" :
$print .= "
parameters:
";
foreach($val2 as $param => $paramData){
$print .= "
".$param.": (typeof ".$paramData['type'].")
";
if(!empty($paramData['summary'])){
$print .= "
".htmlentities($paramData['summary'])."
";
}
$print .= "
";
} //print_r($val2);
$print .= "
";
break;
// the stripped source, and some minimal toggling to show/hide
case "source" :
$print .= "