1 | <?php |
||
12 | abstract class AbstractToken implements Token |
||
13 | { |
||
14 | /** @var Configuration */ |
||
15 | protected $configuration; |
||
16 | |||
17 | /** @var int */ |
||
18 | private $depth; |
||
19 | |||
20 | /** @var null|Token */ |
||
21 | private $parent; |
||
22 | |||
23 | /** @var string */ |
||
24 | private $type; |
||
25 | |||
26 | /** |
||
27 | * Constructor |
||
28 | */ |
||
29 | 65 | public function __construct($type, Configuration $configuration) |
|
44 | |||
45 | /** |
||
46 | * Required by the Token interface. |
||
47 | */ |
||
48 | 40 | public function getDepth() |
|
52 | |||
53 | /** |
||
54 | * Required by the Token interface. |
||
55 | */ |
||
56 | 20 | public function getParent() |
|
60 | |||
61 | /** |
||
62 | * Chainable setter for 'parent'. |
||
63 | */ |
||
64 | 39 | public function setParent(Token $parent = null) |
|
75 | |||
76 | /** |
||
77 | * Required by the Token interface. |
||
78 | */ |
||
79 | 27 | public function getType() |
|
83 | |||
84 | 45 | public static function cleanChildTokens(Configuration $configuration, array &$children, LoggerInterface $logger = null) |
|
105 | |||
106 | 5 | public function __toString() |
|
110 | } |
||
111 |