Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
CRAP | |
0.00% |
0 / 10 |
ConnectException | |
0.00% |
0 / 1 |
|
0.00% |
0 / 3 |
12 | |
0.00% |
0 / 10 |
__construct | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 4 |
|||
getConnectionData | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 3 |
|||
setConnectionData | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 3 |
<?php | |
declare(strict_types = 1); | |
namespace Siesta\Database\Exception; | |
use Siesta\Database\ConnectionData; | |
/** | |
* @author Gregor Müller | |
*/ | |
class ConnectException extends SQLException | |
{ | |
/** | |
* @var ConnectionData | |
*/ | |
protected $connectionData; | |
/** | |
* @param ConnectionData $connectionData | |
* @param string $message | |
* @param int $code | |
*/ | |
public function __construct(ConnectionData $connectionData, string $message = "", int $code = 0) | |
{ | |
parent::__construct($message, $code); | |
$this->connectionData = $connectionData; | |
} | |
/** | |
* @return ConnectionData | |
*/ | |
public function getConnectionData() | |
{ | |
return $this->connectionData; | |
} | |
/** | |
* @param ConnectionData $connectionData | |
*/ | |
public function setConnectionData($connectionData) | |
{ | |
$this->connectionData = $connectionData; | |
} | |
} | |