1 | <?php |
||
7 | class ParsedScript |
||
8 | { |
||
9 | /** |
||
10 | * @var ScriptInterface |
||
11 | */ |
||
12 | private $script; |
||
13 | |||
14 | /** |
||
15 | * @var LogicOpNode |
||
16 | */ |
||
17 | private $ast; |
||
18 | |||
19 | /** |
||
20 | * @var array |
||
21 | */ |
||
22 | private $descriptorMap; |
||
23 | |||
24 | /** |
||
25 | * ParsedScript constructor. |
||
26 | * @param ScriptInterface $script |
||
27 | * @param LogicOpNode $ast |
||
28 | * @param ScriptBranch[] $branches |
||
29 | */ |
||
30 | 182 | public function __construct(ScriptInterface $script, LogicOpNode $ast, array $branches) |
|
53 | |||
54 | /** |
||
55 | * @return bool |
||
56 | */ |
||
57 | 174 | public function hasMultipleBranches() |
|
61 | |||
62 | /** |
||
63 | * Returns a list of paths for this script. This is not |
||
64 | * always guaranteed to be in order, so take care that |
||
65 | * you actually work out the paths in advance of signing, |
||
66 | * and hard code them somehow. |
||
67 | * |
||
68 | * @return array[] - array of paths |
||
69 | */ |
||
70 | public function getPaths() |
||
76 | |||
77 | /** |
||
78 | * Look up the branch by it's path |
||
79 | * |
||
80 | * @param array $branchDesc |
||
81 | * @return bool|ScriptBranch |
||
82 | */ |
||
83 | 178 | public function getBranchByPath(array $branchDesc) |
|
92 | } |
||
93 |