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 * Original code based on the CommonMark JS reference parser (https://bitly.com/commonmark-js)
9 *  - (c) John MacFarlane
10 *
11 * For the full copyright and license information, please view the LICENSE
12 * file that was distributed with this source code.
13 */
14
15namespace League\CommonMark\Node;
16
17final class NodeWalkerEvent
18{
19    /**
20     * @var Node
21     */
22    private $node;
23
24    /**
25     * @var bool
26     */
27    private $isEntering;
28
29    /**
30     * @param Node $node
31     * @param bool $isEntering
32     */
33    public function __construct(Node $node, $isEntering = true)
34    {
35        $this->node = $node;
36        $this->isEntering = $isEntering;
37    }
38
39    public function getNode(): Node
40    {
41        return $this->node;
42    }
43
44    public function isEntering(): bool
45    {
46        return $this->isEntering;
47    }
48}
49