From d06c6e8b0b160a0fdd32a9d1196b5b83c495b7e6 Mon Sep 17 00:00:00 2001 From: Alan Knowles Date: Tue, 25 Oct 2016 17:39:27 +0800 Subject: [PATCH] CodeDoc/Data/Method.php --- CodeDoc/Data/Method.php | 94 ++++++++++++++++++++++------------------- 1 file changed, 50 insertions(+), 44 deletions(-) diff --git a/CodeDoc/Data/Method.php b/CodeDoc/Data/Method.php index 9d63b56..c14a2c1 100644 --- a/CodeDoc/Data/Method.php +++ b/CodeDoc/Data/Method.php @@ -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 + ) ) ) -- 2.39.2