1<?php
2
3/*
4 * This file is part of the league/commonmark package.
5 *
6 * (c) Colin O'Dell <colinodell@gmail.com>
7 *
8 * For the full copyright and license information, please view the LICENSE
9 * file that was distributed with this source code.
10 */
11
12namespace League\CommonMark\Extension\Autolink;
13
14use League\CommonMark\ConfigurableEnvironmentInterface;
15use League\CommonMark\Event\DocumentParsedEvent;
16use League\CommonMark\Extension\ExtensionInterface;
17
18final class AutolinkExtension implements ExtensionInterface
19{
20    public function register(ConfigurableEnvironmentInterface $environment)
21    {
22        $environment->addEventListener(DocumentParsedEvent::class, new EmailAutolinkProcessor());
23        $environment->addEventListener(DocumentParsedEvent::class, new UrlAutolinkProcessor());
24    }
25}
26