-
Notifications
You must be signed in to change notification settings - Fork 1
/
SimpleMacro.php
77 lines (59 loc) · 1.69 KB
/
SimpleMacro.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
<?php declare(strict_types = 1);
namespace Mangoweb\LatteBundle\Macro;
class SimpleMacro
{
/** @var string */
private $name;
/** @var null|string|callable(\Latte\MacroNode, \Latte\PhpWriter):(null|string) */
private $begin;
/** @var null|string|callable(\Latte\MacroNode, \Latte\PhpWriter):(null|string) */
private $end;
/** @var null|string|callable(\Latte\MacroNode, \Latte\PhpWriter):(null|string) */
private $attr;
/** @var int|null */
private $flags;
/**
* @param string $name
* @param null|string|callable(\Latte\MacroNode, \Latte\PhpWriter):(null|string) $begin
* @param null|string|callable(\Latte\MacroNode, \Latte\PhpWriter):(null|string) $end
* @param null|string|callable(\Latte\MacroNode, \Latte\PhpWriter):(null|string) $attr
* @param int|null $flags
*/
public function __construct(string $name, $begin = null, $end = null, $attr = null, ?int $flags = null)
{
$this->name = $name;
$this->begin = $begin;
$this->end = $end;
$this->attr = $attr;
$this->flags = $flags;
}
public function getName(): string
{
return $this->name;
}
/**
* @return null|string|callable(\Latte\MacroNode, \Latte\PhpWriter):(null|string)
*/
public function getBegin()
{
return $this->begin;
}
/**
* @return null|string|callable(\Latte\MacroNode, \Latte\PhpWriter):(null|string)
*/
public function getEnd()
{
return $this->end;
}
/**
* @return null|string|callable(\Latte\MacroNode, \Latte\PhpWriter):(null|string)
*/
public function getAttr()
{
return $this->attr;
}
public function getFlags(): ?int
{
return $this->flags;
}
}