From 857d7e7581aa03574432c9391be79ab586a27397 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= Date: Tue, 1 May 2018 09:18:29 +0300 Subject: [PATCH] add EventumXmlRpcClient with method annotations --- XMLRPC.md | 11 ++++--- lib/Eventum_RPC.php | 6 ++-- src/EventumXmlRpcClient.php | 60 +++++++++++++++++++++++++++++++++++++ 3 files changed, 70 insertions(+), 7 deletions(-) create mode 100644 src/EventumXmlRpcClient.php diff --git a/XMLRPC.md b/XMLRPC.md index ec972ef..95d3894 100644 --- a/XMLRPC.md +++ b/XMLRPC.md @@ -1,10 +1,10 @@ ## Available XMLRPC methods ## -Here are available XMLRPC methods in [Eventum](https://github.com/eventum/eventum) as of version 3.0.2. +Here are available XMLRPC methods in [Eventum](https://github.com/eventum/eventum) as of version 3.4.0. The methods themselves are defined in [RemoteApi](https://github.com/eventum/eventum/blob/master/lib/eventum/rpc/RemoteApi.php) class in Eventum codebase. This output is created with Eventum [CLI](https://github.com/eventum/cli) application [DumpMethods](https://github.com/eventum/cli/blob/master/src/Command/DumpMethodsCommand.php) command. -Methods marked `@access public` do not require authentication, while `@access restricted` (default) require that you either use `setCredentials` to pass authentication credentials, or put `login` and `password` as first two parameters for the call. +Methods marked `@access public` do not require authentication, while `@access protected` (default) require that you either use `setCredentials` to pass authentication credentials, or put `login` and `password` as first two parameters for the call. ```php /** @@ -57,6 +57,7 @@ Methods marked `@access public` do not require authentication, while `@access re * @param string $note * @return string * @access protected + * @since 3.3.0 checks user access and issue close state */ function closeIssue(int, string, int, boolean, string): string @@ -231,11 +232,11 @@ Methods marked `@access public` do not require authentication, while `@access re * @param DateTime $start * @param DateTime $end * @param struct $options - * @return string + * @return struct * @access protected * @since 3.0.2 */ - function getWeeklyReportData(int, string, string, struct): string + function getWeeklyReportData(int, string, string, struct): struct /** * @param string $email @@ -249,6 +250,7 @@ Methods marked `@access public` do not require authentication, while `@access re * @param string $command * @return string * @access protected + * @deprecated since 3.3.0 this method does nothing */ function logCommand(string): string @@ -328,3 +330,4 @@ Methods marked `@access public` do not require authentication, while `@access re * @access protected */ function unredeemIssue(int, array): string +``` diff --git a/lib/Eventum_RPC.php b/lib/Eventum_RPC.php index 98f0161..abc4439 100644 --- a/lib/Eventum_RPC.php +++ b/lib/Eventum_RPC.php @@ -11,11 +11,11 @@ * that were distributed with this source code. */ -use Eventum\RPC\XmlRpcClient; +use Eventum\RPC\EventumXmlRpcClient; /** - * @deprecated since 4.2.0, use \Eventum\RPC\XmlRpcClient + * @deprecated since 4.2.0, use \Eventum\RPC\EventumXmlRpcClient */ -class Eventum_RPC extends XmlRpcClient +class Eventum_RPC extends EventumXmlRpcClient { } diff --git a/src/EventumXmlRpcClient.php b/src/EventumXmlRpcClient.php new file mode 100644 index 0000000..25dc334 --- /dev/null +++ b/src/EventumXmlRpcClient.php @@ -0,0 +1,60 @@ +