update PEAR

This commit is contained in:
Ibnu Maksum
2023-10-05 16:55:44 +07:00
parent 1861358415
commit 071df91de0
64 changed files with 3872 additions and 2100 deletions

View File

@ -2,17 +2,18 @@
/**
* RouterOS API client implementation.
*
*
* RouterOS is the flag product of the company MikroTik and is a powerful router software. One of its many abilities is to allow control over it via an API. This package provides a client for that API, in turn allowing you to use PHP to control RouterOS hosts.
*
*
* PHP version 5
*
*
* @category Net
* @package PEAR2_Net_RouterOS
* @author Vasil Rangelov <boen.robot@gmail.com>
* @copyright 2011 Vasil Rangelov
* @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
* @version 1.0.0b5
* @version 1.0.0b6
* @link http://pear2.php.net/PEAR2_Net_RouterOS
*/
/**
@ -25,9 +26,14 @@ namespace PEAR2\Net\RouterOS;
*/
use LengthException as L;
/**
* Used in $previous
*/
use Exception as E;
/**
* Exception thrown when there is a problem with a word's length.
*
*
* @category Net
* @package PEAR2_Net_RouterOS
* @author Vasil Rangelov <boen.robot@gmail.com>
@ -36,30 +42,31 @@ use LengthException as L;
*/
class LengthException extends L implements Exception
{
const CODE_UNSUPPORTED = 1200;
const CODE_INVALID = 1300;
const CODE_BEYOND_SHEME = 1301;
/**
* The problematic length.
*
* @var mixed The problematic length.
* @var int|double|null
*/
private $_length;
/**
* Creates a new LengthException.
*
* @param string $message The Exception message to throw.
* @param int $code The Exception code.
* @param \Exception $previous The previous exception used for the exception
* chaining.
* @param number $length The length.
*
* @param string $message The Exception message to throw.
* @param int $code The Exception code.
* @param E|null $previous The previous exception used for the
* exception chaining.
* @param int|double|null $length The length.
*/
public function __construct(
$message,
$code = 0,
$previous = null,
E $previous = null,
$length = null
) {
parent::__construct($message, $code, $previous);
@ -68,8 +75,8 @@ class LengthException extends L implements Exception
/**
* Gets the length.
*
* @return number The length.
*
* @return int|double|null The length.
*/
public function getLength()
{
@ -81,7 +88,7 @@ class LengthException extends L implements Exception
/**
* Returns a string representation of the exception.
*
*
* @return string The exception as a string.
*/
public function __toString()