From eb6c0552c19c39db82ef1cadee735204da91de11 Mon Sep 17 00:00:00 2001 From: Guillermo Dev Date: Sun, 14 Oct 2018 00:19:06 +0200 Subject: [PATCH] some comments to help --- src/Webservice/Help.php | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/src/Webservice/Help.php b/src/Webservice/Help.php index 36d6683..e3ea9ac 100644 --- a/src/Webservice/Help.php +++ b/src/Webservice/Help.php @@ -4,8 +4,20 @@ namespace Bsr\Webservice; use Bsr\Webservice\Exception\WebException; use Bsr\Webservice\Formatter\Html; -class Help { - private static function func($ws, $func) { +/** + * Presents the webservice in html format + */ +class Help +{ + + /** + * Show a presentable html output about a publicly + * available webservice fuction + * @param mixed $ws + * @param sting $func the function to be presented + */ + private static function func($ws, $func) + { try { $rm = new \ReflectionMethod($ws, $func); } catch(\ReflectionException $e) { @@ -56,8 +68,14 @@ class Help { ), 'func_help'); } - - public static function content(WebService $ws) { + /** + * Get the list of publicly accessible methods as html + * + * @param WebService $ws + * @return string html + */ + public static function content(WebService $ws) + { $rc = new \ReflectionClass($ws); $methods = array_filter(array_map(function(\ReflectionMethod $m) {