| Total Complexity | 4 |
| Total Lines | 35 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | class CursorProperties |
||
| 6 | { |
||
| 7 | private $holdable; |
||
| 8 | private $scrollable; |
||
| 9 | private $binary; |
||
| 10 | |||
| 11 | public function __construct(bool $holdable, bool $scrollable, bool $binary) |
||
| 16 | } |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Tells whether the cursor is _holdable_, and thus will not be closed automatically with the transaction end. |
||
| 20 | */ |
||
| 21 | public function isHoldable(): bool |
||
| 22 | { |
||
| 23 | return $this->holdable; |
||
| 24 | } |
||
| 25 | |||
| 26 | /** |
||
| 27 | * Tells whether the cursor is _scrollable_, and thus any moves and fetches of multiple tuples is possible. |
||
| 28 | */ |
||
| 29 | public function isScrollable(): bool |
||
| 30 | { |
||
| 31 | return $this->scrollable; |
||
| 32 | } |
||
| 33 | |||
| 34 | /** |
||
| 35 | * Tells whether the cursor is binary, and thus returns binary data rather than plaintext. |
||
| 36 | */ |
||
| 37 | public function isBinary(): bool |
||
| 40 | } |
||
| 41 | } |
||
| 42 |