X-Git-Url: http://git.roojs.org/?a=blobdiff_plain;f=CodeDoc%2FData%2FClass.php;h=a30d08a8b8154646716ecc64be926f077db435b5;hb=9177a84e017a9309af20752b0d3144adad88e093;hp=ff6ec8e4d032e40884384ee59a40ab0ccbeb8e67;hpb=7c3094d3a820779a76e9e1f770144fb2bb4f26a9;p=PHP_CodeDoc diff --git a/CodeDoc/Data/Class.php b/CodeDoc/Data/Class.php index ff6ec8e..a30d08a 100644 --- a/CodeDoc/Data/Class.php +++ b/CodeDoc/Data/Class.php @@ -64,15 +64,17 @@ class PHP_CodeDoc_Data_Class { { $ret = array(); $cats = array(); + $cls = str_replace('_','-',strtolower($this->name)); foreach($this->Operations as $op) { if (!isset($op->description->category)) { echo "missing Category for {$this->name}::{$op->name}\n"; } else { $cats[$op->description->category] = isset($cats[$op->description->category]) ? $cats[$op->description->category] : array(); - $cats[$op->description->category][] = $op->name; + $cats[$op->description->category][] = $op; } - $ret[str_replace('_','-',strtolower($this->name)). '/'.$op->name] = $op->toJS(); + $n = $cls . '/'. ($op->name == '__construct' ? 'new' : $op->name;; + $ret[$n] = $op->toJS(); } foreach($this->Attributes as $op) { // $ret[$this->name . '.'.$op->name] = $op->toJS(); @@ -90,21 +92,26 @@ class PHP_CodeDoc_Data_Class { { sort($ar); $ret = array( - 'xns' => 'Roo.bootstrap', + '|xns' => 'Roo.bootstrap', 'xtype' => 'NavGroup', 'items' => array( ) ); - foreach($ar as $c) { + foreach($ar as $op) { + $c = $cname = $op->name; + if ($c == '__construct') { + $cname = 'new ' . $op->{'class'}; + $c = 'new'; + } $ret['items'][] = array( - 'xns' => 'Roo.bootstrap', + '|xns' => 'Roo.bootstrap', 'xtype' => 'NavItem', 'href' => '#' . str_replace('_','-',strtolower($this->name)). '/'.$c, - 'html' => $c + 'html' => $cname ); } - + return $ret; }