diff --git a/plugins/restapi/doc/doc.php b/plugins/restapi/doc/doc.php index 98659e8..4d8b8b5 100644 --- a/plugins/restapi/doc/doc.php +++ b/plugins/restapi/doc/doc.php @@ -16,100 +16,86 @@ public function addClass($classname) public function output() { - $this->header(); + $output = $this->header(); foreach ($this->classes as $class) { $reflect = new \ReflectionClass($class); $methods = $reflect->getMethods(); foreach ($methods as $method) { if (Common::method_allowed($reflect->getShortName(),$method->name)) { - echo '
'; - echo ''; - echo '
'; - echo '
'; + $output .= '
'; + $output .= ''; + $output .= '
'; + $output .= '
'; $comment = $method->getDocComment(); $comment = str_replace('/**', '', $comment); $comment = str_replace('*/', '', $comment); - $comment = str_replace('[*', '', $comment); - $comment = str_replace('[', '', $comment); + $comment = str_replace('[*', '', $comment); + $comment = str_replace('[', '', $comment); $comment = str_replace(']', '', $comment); - $comment = str_replace('{', '', $comment); + $comment = str_replace('{', '', $comment); $comment = str_replace('}', '', $comment); $comment = str_replace('*', '', $comment); //$comment = str_replace( '

', '', $comment ); - echo trim($comment); + $output .= trim($comment); - echo '
'; - echo '
'; - echo '
'; - echo '
'; + $output .= '
'; + $output .= '
'; + $output .= '
'; + $output .= '
'; } } } - $this->footer(); + $output .= $this->footer(); - exit; + return $output; } public function header() { - ?> - - - - - API Plugin to phpList - - - - -
- -

 

+ return '
-
+

API Plugin to phpList

-

Documentation generated

+

Documentation generated '. date('Y-m-d H:i:s').' +

-
+
The following methods is called by Body Param [cmd] to the plugin URL via request method POST.

- Required body parameter
- Optional body parameter
- Datatype
+ Required body parameter
+ Optional body parameter
+ Datatype

- + return ' -
- - -