1 | <?php |
||
20 | class FunctionDefinition extends ParentDefinition |
||
21 | { |
||
22 | /** |
||
23 | * @todo Use Finder |
||
24 | * |
||
25 | * @var string |
||
26 | */ |
||
27 | protected $filepath; |
||
28 | |||
29 | /** |
||
30 | * @var Node\Stmt\Function_ |
||
31 | */ |
||
32 | protected $statement; |
||
33 | |||
34 | /** |
||
35 | * @var int |
||
36 | */ |
||
37 | protected $returnTypes = CompiledExpression::MIXED; |
||
38 | |||
39 | /** |
||
40 | * @var array |
||
41 | */ |
||
42 | protected $possibleReturnTypes = []; |
||
43 | |||
44 | /** |
||
45 | * @param string $name |
||
46 | * @param Node\Stmt\Function_ $statement |
||
47 | */ |
||
48 | 5 | public function __construct($name, Node\Stmt\Function_ $statement) |
|
53 | |||
54 | /** |
||
55 | * Compile function to check it |
||
56 | * |
||
57 | * @param Context $context |
||
58 | * @return bool |
||
59 | */ |
||
60 | 5 | public function compile(Context $context) |
|
105 | |||
106 | /** |
||
107 | * @return string |
||
108 | */ |
||
109 | 5 | public function getFilepath() |
|
113 | |||
114 | /** |
||
115 | * @param string $filepath |
||
116 | */ |
||
117 | 5 | public function setFilepath($filepath) |
|
121 | |||
122 | /** |
||
123 | * @return Node\Param[] |
||
124 | */ |
||
125 | 1 | public function getParams() |
|
129 | } |
||
130 |