Skip to content

Commit

Permalink
Merge branch 'master_MDL-76929' of https://github.com/mattporritt/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
ilyatregubov committed Apr 26, 2023
2 parents 49d013e + 02826f4 commit dd4a990
Show file tree
Hide file tree
Showing 35 changed files with 4,694 additions and 2,172 deletions.
1,590 changes: 1,148 additions & 442 deletions lib/phpxmlrpc/Client.php

Large diffs are not rendered by default.

216 changes: 113 additions & 103 deletions lib/phpxmlrpc/Encoder.php

Large diffs are not rendered by default.

7 changes: 7 additions & 0 deletions lib/phpxmlrpc/Exception.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace PhpXmlRpc;

class Exception extends \Exception
{
}
12 changes: 12 additions & 0 deletions lib/phpxmlrpc/Exception/FaultResponseException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace PhpXmlRpc\Exception;

use PhpXmlRpc\Exception as BaseExtension;

/**
* To be used when throwing exceptions instead of returning Response objects (future API?)
*/
class FaultResponseException extends BaseExtension
{
}
5 changes: 4 additions & 1 deletion lib/phpxmlrpc/Exception/HttpException.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,10 @@

namespace PhpXmlRpc\Exception;

class HttpException extends PhpXmlrpcException
/**
* To be used for all errors related to parsing HTTP requests and responses
*/
class HttpException extends TransportException
{
protected $statusCode;

Expand Down
7 changes: 7 additions & 0 deletions lib/phpxmlrpc/Exception/NoSuchMethodException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace PhpXmlRpc\Exception;

class NoSuchMethodException extends ServerException
{
}
12 changes: 12 additions & 0 deletions lib/phpxmlrpc/Exception/ParsingException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace PhpXmlRpc\Exception;

use PhpXmlRpc\Exception as BaseExtension;

/**
* Base exception for errors while parsing xml-rpc requests/responses: charset issue, xml issues, xml-rpc issues
*/
class ParsingException extends BaseExtension
{
}
7 changes: 2 additions & 5 deletions lib/phpxmlrpc/Exception/PhpXmlrpcException.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
<?php

namespace PhpXmlRpc\Exception;

class PhpXmlrpcException extends \Exception
{
}
// deprecated. Kept around for BC
class_alias('PhpXmlRpc\Exception', 'PhpXmlRpc\Exception\PhpXmlRpcException');
12 changes: 12 additions & 0 deletions lib/phpxmlrpc/Exception/ServerException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace PhpXmlRpc\Exception;

use PhpXmlRpc\Exception as BaseExtension;

/**
* Base exception for errors thrown by the server while trying to handle the requests, such as errors with the dispatch map
*/
class ServerException extends BaseExtension
{
}
12 changes: 12 additions & 0 deletions lib/phpxmlrpc/Exception/StateErrorException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace PhpXmlRpc\Exception;

use PhpXmlRpc\Exception as BaseExtension;

/**
* Exception thrown when an object is in such a state that it can not fulfill execution of a method
*/
class StateErrorException extends BaseExtension
{
}
12 changes: 12 additions & 0 deletions lib/phpxmlrpc/Exception/TransportException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace PhpXmlRpc\Exception;

use PhpXmlRpc\Exception as BaseExtension;

/**
* To be used for all errors related to the transport, which are not related to specifically to HTTP. Eg: can not open socket
*/
class TransportException extends BaseExtension
{
}
12 changes: 12 additions & 0 deletions lib/phpxmlrpc/Exception/TypeErrorException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace PhpXmlRpc\Exception;

use PhpXmlRpc\Exception as BaseExtension;

/**
* Exception thrown when an argument passed to a function or method has an unsupported type
*/
class TypeErrorException extends BaseExtension
{
}
12 changes: 12 additions & 0 deletions lib/phpxmlrpc/Exception/ValueErrorException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
<?php

namespace PhpXmlRpc\Exception;

use PhpXmlRpc\Exception as BaseExtension;

/**
* Exception thrown when an argument passed to a function or method has an unsupported value (but its type is ok)
*/
class ValueErrorException extends BaseExtension
{
}
7 changes: 7 additions & 0 deletions lib/phpxmlrpc/Exception/XmlException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace PhpXmlRpc\Exception;

class XmlException extends ParsingException
{
}
7 changes: 7 additions & 0 deletions lib/phpxmlrpc/Exception/XmlRpcException.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<?php

namespace PhpXmlRpc\Exception;

class XmlRpcException extends ParsingException
{
}
Loading

0 comments on commit dd4a990

Please sign in to comment.