some comments to help
This commit is contained in:
@@ -4,8 +4,20 @@ namespace Bsr\Webservice;
|
|||||||
use Bsr\Webservice\Exception\WebException;
|
use Bsr\Webservice\Exception\WebException;
|
||||||
use Bsr\Webservice\Formatter\Html;
|
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 {
|
try {
|
||||||
$rm = new \ReflectionMethod($ws, $func);
|
$rm = new \ReflectionMethod($ws, $func);
|
||||||
} catch(\ReflectionException $e) {
|
} catch(\ReflectionException $e) {
|
||||||
@@ -56,8 +68,14 @@ class Help {
|
|||||||
), 'func_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);
|
$rc = new \ReflectionClass($ws);
|
||||||
|
|
||||||
$methods = array_filter(array_map(function(\ReflectionMethod $m) {
|
$methods = array_filter(array_map(function(\ReflectionMethod $m) {
|
||||||
|
|||||||
Reference in New Issue
Block a user