From 870656353d3492c5dfd407352497f31763a31606 Mon Sep 17 00:00:00 2001
From: Alan Knowles
Date: Tue, 27 Nov 2018 12:17:07 +0800
Subject: [PATCH] Uncommited changes synced
---
CodeDoc/Data/Docbook.php | 2 +-
CodeDoc/Data/Method.php | 11 +++++++++++
CodeDoc/Data/PhpDoc.php | 21 ++++++++++++++++++---
CodeDoc/Parser/Comment.php | 2 +-
4 files changed, 31 insertions(+), 5 deletions(-)
diff --git a/CodeDoc/Data/Docbook.php b/CodeDoc/Data/Docbook.php
index 84076f3..324f68c 100644
--- a/CodeDoc/Data/Docbook.php
+++ b/CodeDoc/Data/Docbook.php
@@ -105,7 +105,7 @@ class PHP_CodeDoc_Data_Docbook {
$buffer ="";
$this->addSection($section);
break;
- case "@docbook_page_summary":
+ case "@docbook_page_summary":
$summary = preg_replace("/\s*\@docbook_page_summary\s*/i","",$line);
$this->addPara($buffer);
$buffer ="";
diff --git a/CodeDoc/Data/Method.php b/CodeDoc/Data/Method.php
index 6419241..dc106c5 100644
--- a/CodeDoc/Data/Method.php
+++ b/CodeDoc/Data/Method.php
@@ -153,6 +153,17 @@ class PHP_CodeDoc_Data_Method extends PHP_CodeDoc_Data {
}
+ if ($this->name == '__construct') {
+ // list out 'Constants'
+
+ // list out 'public variables..'
+
+
+
+ }
+
+
+
/* -- fixme - needs to read from an example file..
array(
'stype' => 'example',
diff --git a/CodeDoc/Data/PhpDoc.php b/CodeDoc/Data/PhpDoc.php
index 33d6371..48b9da6 100644
--- a/CodeDoc/Data/PhpDoc.php
+++ b/CodeDoc/Data/PhpDoc.php
@@ -25,6 +25,9 @@
* @author Alan Knowles
*
*/
+
+require_once 'Param.php';
+
class PHP_CodeDoc_Data_PhpDoc {
var $long = ""; // name of parameter
var $short = ""; // default value
@@ -50,9 +53,8 @@ class PHP_CodeDoc_Data_PhpDoc {
function __construct()
{
- $this->return = new stdClass();
- $this->return->type = '';
- $this->return->desc= '';
+ $this->return = new PHP_CodeDoc_Data_Param();
+
}
function longToHTML()
@@ -60,6 +62,19 @@ class PHP_CodeDoc_Data_PhpDoc {
$ret = ''. $this->long .'
';
$ret = preg_replace('/\n\s+\n/','
',$ret);
+ $bits = explode('```', $ret);
+
+ if (count($bits) > 1) {
+ $otag = $tag ='
';
+ $ret = '';
+ foreach($bits as $b) {
+ //if ($tag == '
') {
+ // $b = preg_replace('/\n/', "
\n", $b);
+ // }
+ $ret .= $b . $tag;
+ $tag = $tag == $otag ? '
' : $otag;
+ }
+ }
// code....
return $ret;
diff --git a/CodeDoc/Parser/Comment.php b/CodeDoc/Parser/Comment.php
index a52e495..34e394a 100644
--- a/CodeDoc/Parser/Comment.php
+++ b/CodeDoc/Parser/Comment.php
@@ -160,7 +160,7 @@ class PHP_CodeDoc_Parser_Comment {
$flags['rawdata'] = TRUE;
break;
default:
- $desc->$key = $linedata[2];
+ $desc->$key = $linedata[2];
}
continue;
}
--
2.39.2