1 | <?php |
||
21 | class FunctionDefinition extends ParentDefinition |
||
22 | { |
||
23 | /** |
||
24 | * @todo Use Finder |
||
25 | * |
||
26 | * @var string |
||
27 | */ |
||
28 | protected $filepath; |
||
29 | |||
30 | /** |
||
31 | * @var Node\Stmt\Function_ |
||
32 | */ |
||
33 | protected $statement; |
||
34 | |||
35 | /** |
||
36 | * @var int |
||
37 | */ |
||
38 | protected $returnTypes = CompiledExpression::MIXED; |
||
39 | |||
40 | /** |
||
41 | * @var array |
||
42 | */ |
||
43 | protected $possibleReturnTypes = []; |
||
44 | |||
45 | /** |
||
46 | * @param string $name |
||
47 | * @param Node\Stmt\Function_ $statement |
||
48 | */ |
||
49 | 6 | public function __construct($name, Node\Stmt\Function_ $statement) |
|
54 | |||
55 | /** |
||
56 | * Compile function to check it |
||
57 | * |
||
58 | * @param Context $context |
||
59 | * @return bool |
||
60 | */ |
||
61 | 6 | public function compile(Context $context) |
|
110 | |||
111 | /** |
||
112 | * @return string |
||
113 | */ |
||
114 | 6 | public function getFilepath() |
|
118 | |||
119 | /** |
||
120 | * @param string $filepath |
||
121 | */ |
||
122 | 6 | public function setFilepath($filepath) |
|
126 | |||
127 | /** |
||
128 | * @return Node\Param[] |
||
129 | */ |
||
130 | 1 | public function getParams() |
|
134 | } |
||
135 |