PEAR2_Net_RouterOS  1.0.0b1
A MikroTik RouterOS client
PEAR2/Net/RouterOS/LengthtException.php
Go to the documentation of this file.
00001 <?php
00002 
00022 namespace PEAR2\Net\RouterOS;
00023 
00033 class LengthException extends \LengthException implements Exception
00034 {
00035 
00040     private $_length = null;
00041 
00051     public function __construct($message, $code = 0, $previous = null,
00052         $value = null
00053     ) {
00054         parent::__construct($message, $code, $previous);
00055         $this->_length = $value;
00056     }
00057 
00063     public function getLength()
00064     {
00065         return $this->_length;
00066     }
00067 
00068     // @codeCoverageIgnoreStart
00069     // String representation is not reliable in testing
00070 
00076     public function __toString()
00077     {
00078         return parent::__toString() . "\nValue:{$this->_length}";
00079     }
00080 
00081     // @codeCoverageIgnoreEnd
00082 }