1<?php 2 3declare(strict_types=1); 4 5/* 6 * This is part of the league/commonmark package. 7 * 8 * (c) Martin Hasoň <martin.hason@gmail.com> 9 * (c) Webuni s.r.o. <info@webuni.cz> 10 * (c) Colin O'Dell <colinodell@gmail.com> 11 * 12 * For the full copyright and license information, please view the LICENSE 13 * file that was distributed with this source code. 14 */ 15 16namespace League\CommonMark\Extension\Table; 17 18use League\CommonMark\ConfigurableEnvironmentInterface; 19use League\CommonMark\Extension\ExtensionInterface; 20 21final class TableExtension implements ExtensionInterface 22{ 23 public function register(ConfigurableEnvironmentInterface $environment): void 24 { 25 $environment 26 ->addBlockParser(new TableParser()) 27 28 ->addBlockRenderer(Table::class, new TableRenderer()) 29 ->addBlockRenderer(TableSection::class, new TableSectionRenderer()) 30 ->addBlockRenderer(TableRow::class, new TableRowRenderer()) 31 ->addBlockRenderer(TableCell::class, new TableCellRenderer()) 32 ; 33 } 34} 35