1: <?php
2:
3: /**
4: * This file is part of the Latte (https://latte.nette.org)
5: * Copyright (c) 2008 David Grudl (https://davidgrudl.com)
6: */
7:
8: namespace Latte;
9:
10:
11: /**
12: * HTML element node.
13: */
14: class HtmlNode
15: {
16: use Strict;
17:
18: /** @var string */
19: public $name;
20:
21: /** @var bool */
22: public $empty;
23:
24: /** @deprecated */
25: public $isEmpty;
26:
27: /** @var array */
28: public $attrs = [];
29:
30: /** @var array */
31: public $macroAttrs = [];
32:
33: /** @var bool */
34: public $closing = false;
35:
36: /** @var HtmlNode */
37: public $parentNode;
38:
39: /** @var string */
40: public $attrCode;
41:
42: /** @var int position of start tag in source template */
43: public $startLine;
44:
45: /** @var int position of end tag in source template */
46: public $endLine;
47:
48: /** @var string @internal */
49: public $innerMarker;
50:
51:
52: public function __construct($name, self $parentNode = null)
53: {
54: $this->name = $name;
55: $this->parentNode = $parentNode;
56: $this->isEmpty = &$this->empty;
57: }
58: }
59: