1 | <?php |
||
53 | class IncludeActionProxy implements ActionProxy |
||
54 | { |
||
55 | /** |
||
56 | * Path to the to-be-included file |
||
57 | * |
||
58 | * @var string |
||
59 | */ |
||
60 | protected $file; |
||
61 | |||
62 | /** |
||
63 | * Services Container |
||
64 | * |
||
65 | * @var Container |
||
66 | */ |
||
67 | protected $services; |
||
68 | |||
69 | /** |
||
70 | * Actual Application Context |
||
71 | * |
||
72 | * @var Context |
||
73 | */ |
||
74 | protected $context; |
||
75 | |||
76 | /** |
||
77 | * |
||
78 | * @var array |
||
79 | */ |
||
80 | protected $actionData = array(); |
||
81 | |||
82 | /** |
||
83 | * Constructor |
||
84 | * |
||
85 | * @param string $file Path to the PHP file to be included |
||
86 | * |
||
87 | * @throws \InvalidArgumentException if $file is empty |
||
88 | */ |
||
89 | 7 | public function __construct($file) |
|
99 | |||
100 | /** |
||
101 | * Includes the PHP file and return the content. |
||
102 | * |
||
103 | * @param Application $app The running Application |
||
104 | * @param Context $context Actual context |
||
105 | * |
||
106 | * @return mixed or void if the file doesn't end with a return statement |
||
107 | * @throws Exception if the file is not readable/does not exist |
||
108 | */ |
||
109 | 4 | public function execute(Application $app, Context $context) |
|
122 | |||
123 | /** |
||
124 | * Return the Services Container |
||
125 | * |
||
126 | * @return Container |
||
127 | */ |
||
128 | 1 | public function getServices() |
|
132 | |||
133 | /** |
||
134 | * Return the actual context |
||
135 | * |
||
136 | * @return Context |
||
137 | */ |
||
138 | 1 | public function getContext() |
|
142 | |||
143 | 1 | public function getActionData() |
|
147 | |||
148 | 1 | public function setActionData(array $data) |
|
152 | |||
153 | 1 | public function __get($name) |
|
160 | |||
161 | public function __isset($name) |
||
165 | } |
Our type inference engine in quite powerful, but sometimes the code does not provide enough clues to go by. In these cases we request you to add a
@return
annotation as described here.