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: * Latte macro.
13: */
14: interface IMacro
15: {
16: const
17: AUTO_EMPTY = 4,
18: AUTO_CLOSE = 64,
19: ALLOWED_IN_HEAD = 128,
20: DEFAULT_FLAGS = 0;
21:
22: /**
23: * Initializes before template parsing.
24: * @return void
25: */
26: function initialize();
27:
28: /**
29: * Finishes template parsing.
30: * @return array|null [prolog, epilog]
31: */
32: function finalize();
33:
34: /**
35: * New node is found. Returns false to reject.
36: * @return bool|null
37: */
38: function nodeOpened(MacroNode $node);
39:
40: /**
41: * Node is closed.
42: * @return void
43: */
44: function nodeClosed(MacroNode $node);
45: }
46: