| 1 | <?php |
||
| 20 | class FencedCode extends AbstractBlock implements StringContainerInterface |
||
| 21 | { |
||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $info; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | protected $literal = ''; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var int |
||
| 34 | */ |
||
| 35 | protected $length; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * @var string |
||
| 39 | */ |
||
| 40 | protected $char; |
||
| 41 | |||
| 42 | /** |
||
| 43 | * @var int |
||
| 44 | */ |
||
| 45 | protected $offset; |
||
| 46 | |||
| 47 | /** |
||
| 48 | * @param int $length |
||
| 49 | * @param string $char |
||
| 50 | * @param int $offset |
||
| 51 | */ |
||
| 52 | 126 | public function __construct(int $length, string $char, int $offset) |
|
| 53 | { |
||
| 54 | 126 | $this->length = $length; |
|
| 55 | 126 | $this->char = $char; |
|
| 56 | 126 | $this->offset = $offset; |
|
| 57 | 126 | } |
|
| 58 | |||
| 59 | /** |
||
| 60 | * @return string |
||
| 61 | */ |
||
| 62 | 3 | public function getInfo(): string |
|
| 66 | |||
| 67 | /** |
||
| 68 | * @return string[] |
||
| 69 | */ |
||
| 70 | 114 | public function getInfoWords(): array |
|
| 74 | |||
| 75 | 111 | public function setInfo(string $info): void |
|
| 79 | |||
| 80 | 111 | public function getLiteral(): string |
|
| 84 | |||
| 85 | 111 | public function setLiteral(string $literal): void |
|
| 89 | |||
| 90 | /** |
||
| 91 | * @return string |
||
| 92 | */ |
||
| 93 | 105 | public function getChar(): string |
|
| 97 | |||
| 98 | /** |
||
| 99 | * @param string $char |
||
| 100 | * |
||
| 101 | * @return $this |
||
| 102 | */ |
||
| 103 | 3 | public function setChar(string $char): self |
|
| 109 | |||
| 110 | /** |
||
| 111 | * @return int |
||
| 112 | */ |
||
| 113 | 96 | public function getLength(): int |
|
| 117 | |||
| 118 | /** |
||
| 119 | * @param int $length |
||
| 120 | * |
||
| 121 | * @return $this |
||
| 122 | */ |
||
| 123 | 3 | public function setLength(int $length): self |
|
| 129 | |||
| 130 | /** |
||
| 131 | * @return int |
||
| 132 | */ |
||
| 133 | 99 | public function getOffset(): int |
|
| 137 | |||
| 138 | /** |
||
| 139 | * @param int $offset |
||
| 140 | * |
||
| 141 | * @return $this |
||
| 142 | */ |
||
| 143 | 3 | public function setOffset(int $offset): self |
|
| 149 | } |
||
| 150 |