Files
.github
admin
install
pages_template
qrcode
system
autoload
PEAR2
Cache
Console
Net
RouterOS
Client.php
Communicator.php
DataFlowException.php
Exception.php
InvalidArgumentException.php
LengthException.php
Message.php
NotSupportedException.php
ParserException.php
Query.php
Registry.php
Request.php
Response.php
ResponseCollection.php
RouterErrorException.php
Script.php
SocketException.php
UnexpectedValueException.php
Util.php
Transmitter
Autoload.php
Admin.php
App.php
Balance.php
File.php
Hookers.php
Http.php
Lang.php
Message.php
Mikrotik.php
Package.php
Paginator.php
Password.php
Radius.php
Timezone.php
User.php
Validator.php
index.html
cache
controllers
lan
paymentgateway
plugin
uploads
vendor
boot.php
composer.json
composer.lock
cron.php
cron_reminder.php
index.html
orm.php
updates.json
ui
.gitignore
CHANGELOG.md
LICENSE
README.md
composer.json
config.sample.php
favicon.ico
index.php
update.php
version.json
mitrobill/system/autoload/PEAR2/Net/RouterOS/NotSupportedException.php

99 lines
2.4 KiB
PHP
Raw Normal View History

2017-03-11 02:51:06 +07:00
<?php
/**
* RouterOS API client implementation.
2023-10-05 16:55:44 +07:00
*
2017-03-11 02:51:06 +07:00
* 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.
2023-10-05 16:55:44 +07:00
*
2017-03-11 02:51:06 +07:00
* PHP version 5
2023-10-05 16:55:44 +07:00
*
2017-03-11 02:51:06 +07:00
* @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
2023-10-05 16:55:44 +07:00
* @version 1.0.0b6
2017-03-11 02:51:06 +07:00
* @link http://pear2.php.net/PEAR2_Net_RouterOS
*/
/**
* The namespace declaration.
*/
namespace PEAR2\Net\RouterOS;
/**
* Base of this class.
*/
use Exception as E;
/**
* Exception thrown when encountering something not supported by RouterOS or
* this package.
2023-10-05 16:55:44 +07:00
*
2017-03-11 02:51:06 +07:00
* @category Net
* @package PEAR2_Net_RouterOS
* @author Vasil Rangelov <boen.robot@gmail.com>
* @license http://www.gnu.org/copyleft/lesser.html LGPL License 2.1
* @link http://pear2.php.net/PEAR2_Net_RouterOS
*/
class NotSupportedException extends E implements Exception
{
const CODE_CONTROL_BYTE = 1601;
2023-10-05 16:55:44 +07:00
const CODE_MENU_MISMATCH = 60000;
const CODE_ARG_PROHIBITED = 60001;
2017-03-11 02:51:06 +07:00
/**
2023-10-05 16:55:44 +07:00
* The unsupported value.
*
* @var mixed
2017-03-11 02:51:06 +07:00
*/
private $_value;
/**
* Creates a new NotSupportedException.
2023-10-05 16:55:44 +07:00
*
* @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
2017-03-11 02:51:06 +07:00
* chaining.
2023-10-05 16:55:44 +07:00
* @param mixed $value The unsupported value.
2017-03-11 02:51:06 +07:00
*/
public function __construct(
$message,
$code = 0,
2023-10-05 16:55:44 +07:00
E $previous = null,
2017-03-11 02:51:06 +07:00
$value = null
) {
parent::__construct($message, $code, $previous);
$this->_value = $value;
}
/**
* Gets the unsupported value.
2023-10-05 16:55:44 +07:00
*
2017-03-11 02:51:06 +07:00
* @return mixed The unsupported value.
*/
public function getValue()
{
return $this->_value;
}
// @codeCoverageIgnoreStart
// String representation is not reliable in testing
/**
* Returns a string representation of the exception.
2023-10-05 16:55:44 +07:00
*
2017-03-11 02:51:06 +07:00
* @return string The exception as a string.
*/
public function __toString()
{
return parent::__toString() . "\nValue:{$this->_value}";
}
// @codeCoverageIgnoreEnd
}