CodeDoc/Data/Method.php
authorAlan Knowles <alan@roojs.com>
Tue, 25 Oct 2016 09:39:27 +0000 (17:39 +0800)
committerAlan Knowles <alan@roojs.com>
Tue, 25 Oct 2016 09:39:27 +0000 (17:39 +0800)
CodeDoc/Data/Method.php

index 9d63b56..c14a2c1 100644 (file)
@@ -95,9 +95,55 @@ class PHP_CodeDoc_Data_Method extends PHP_CodeDoc_Data {
         }    
         
         
-        return
+        $items = array(
+            array(
+                'name' => $this->name ,
+                'is_static' => $this->isStatic ? true:false,
+                'is_constructor' => $this->name == '__construct' ,
+                'memberof' => $this->class,
+                'returndesc' => $this->name == '_construct' ? '' : $this->description->return->desc,
+                'returntype' => $this->name == '_construct' ? '' : $this->description->return->type,
+                
+                '|xns' => 'Roo.doc',
+                'xtype' => 'Synopsis',
+                'items' => $params
+            ),
+            array(
+                'stype' => 'desc',
+                '|xns' => 'Roo.doc',
+                'xtype' => 'Section',
+                'items' => array(
+                    array(
+                        'html' => $this->description->long,
+                      '|xns' => 'Roo.doc',
+                       'xtype' => 'Para',
+                   )
+                )
+            ),
+            array(
+                'stype' => 'parameter',
+                '|xns' => 'Roo.doc',
+                'xtype' => 'Section',
+            ),
+          
+        );
         
-        array(
+        if ( $this->name != '_construct') {
+            $items[] = array(
+                'stype' => 'return',
+                '|xns' => 'Roo.doc',
+                'xtype' => 'Section',
+            );
+        }
+                        /* -- fixme - needs to read from an example file..
+                        array(
+                            'stype' => 'example',
+                            '|xns' => 'Roo.doc',
+                            'xtype' => 'Section',
+                        )
+                        */
+        
+        return array(
             "name" => $this->name ,
             "parent" => "",
             "title" => "",
@@ -114,48 +160,8 @@ class PHP_CodeDoc_Data_Method extends PHP_CodeDoc_Data {
                     '|xns' => 'Roo.doc',
                     'xtype' => 'Entry',
                     
-                    'items' => array(
-                        array(
-                            'name' => $this->name ,
-                            'is_static' => $this->isStatic ? true:false,
-                            'is_constructor' => $this->name == '__construct' ,
-                            'memberof' => $this->class,
-                            'returndesc' => $this->name == '_construct' ? '' : $this->description->return->desc,
-                            'returntype' => $this->name == '_construct' ? '' : $this->description->return->type,
-                            
-                            '|xns' => 'Roo.doc',
-                            'xtype' => 'Synopsis',
-                            'items' => $params
-                        ),
-                        array(
-                            'stype' => 'desc',
-                            '|xns' => 'Roo.doc',
-                            'xtype' => 'Section',
-                            'items' => array(
-                                array(
-                                    'html' => $this->description->long,
-                                  '|xns' => 'Roo.doc',
-                                   'xtype' => 'Para',
-                               )
-                            )
-                        ),
-                        array(
-                            'stype' => 'parameter',
-                            '|xns' => 'Roo.doc',
-                            'xtype' => 'Section',
-                        ),
-                        array(
-                            'stype' => 'return',
-                            '|xns' => 'Roo.doc',
-                            'xtype' => 'Section',
-                        ),
-                        /* -- fixme - needs to read from an example file..
-                        array(
-                            'stype' => 'example',
-                            '|xns' => 'Roo.doc',
-                            'xtype' => 'Section',
-                        )
-                        */
+                    'items' => $items
+                         
                     )   
                 )
             )