| 1 | <?php |
||
| 24 | final class TableSection extends AbstractStringContainerBlock implements InlineContainerInterface |
||
| 25 | { |
||
| 26 | const TYPE_HEAD = 'thead'; |
||
| 27 | const TYPE_BODY = 'tbody'; |
||
| 28 | |||
| 29 | public $type = self::TYPE_BODY; |
||
| 30 | |||
| 31 | 114 | public function __construct(string $type = self::TYPE_BODY) |
|
| 36 | |||
| 37 | 3 | public function isHead(): bool |
|
| 38 | { |
||
| 39 | 3 | return self::TYPE_HEAD === $this->type; |
|
| 40 | } |
||
| 41 | |||
| 42 | 3 | public function isBody(): bool |
|
| 43 | { |
||
| 44 | 3 | return self::TYPE_BODY === $this->type; |
|
| 45 | } |
||
| 46 | |||
| 47 | 3 | public function canContain(AbstractBlock $block): bool |
|
| 48 | { |
||
| 49 | 3 | return $block instanceof TableRow; |
|
| 50 | } |
||
| 51 | |||
| 52 | 3 | public function isCode(): bool |
|
| 53 | { |
||
| 54 | 3 | return false; |
|
| 55 | } |
||
| 56 | |||
| 57 | 66 | public function matchesNextLine(Cursor $cursor): bool |
|
| 61 | |||
| 62 | 3 | public function handleRemainingContents(ContextInterface $context, Cursor $cursor): void |
|
| 63 | { |
||
| 64 | 3 | } |
|
| 65 | } |
||
| 66 |