1 | <?php |
||
8 | class Server |
||
9 | { |
||
10 | /** |
||
11 | * Name of the server |
||
12 | * @var string |
||
13 | */ |
||
14 | public $name = "ReactRestify"; |
||
15 | |||
16 | /** |
||
17 | * Version of the API |
||
18 | * @var null |
||
19 | */ |
||
20 | public $version = null; |
||
21 | |||
22 | /** |
||
23 | * @var \React\Restify\Router |
||
24 | */ |
||
25 | private $router; |
||
26 | |||
27 | /** |
||
28 | * @var string |
||
29 | */ |
||
30 | private $allowOrigin = "*"; |
||
31 | |||
32 | /** |
||
33 | * @param null $name |
||
34 | * @param null $version |
||
35 | */ |
||
36 | public function __construct($name = null, $version = null) |
||
50 | |||
51 | /** |
||
52 | * Parse request from user |
||
53 | * |
||
54 | * @param \React\Http\Request $HttpRequest |
||
55 | * @param \React\Http\Response $HttpResponse |
||
56 | */ |
||
57 | public function __invoke(HttpRequest $httpRequest, HttpResponse $httpResponse) |
||
81 | |||
82 | /** |
||
83 | * Create a new group of route |
||
84 | * @param String $prefix prefix of the routes |
||
85 | * @param Callable $callback |
||
86 | * |
||
87 | * @return \CapMousse\ReactRestify\Routing\Routes |
||
88 | */ |
||
89 | public function group($prefix, $callback) |
||
93 | |||
94 | /** |
||
95 | * The the Access-Control-Allow-Origin header |
||
96 | * |
||
97 | * @param string $origin |
||
98 | */ |
||
99 | public function setAccessControlAllowOrigin($origin) |
||
103 | |||
104 | /** |
||
105 | * Init default event catch |
||
106 | * |
||
107 | * @return void |
||
108 | */ |
||
109 | private function initEvents() |
||
133 | |||
134 | /** |
||
135 | * Manual router event manager |
||
136 | * @param String $event |
||
137 | * @param Callable $callback |
||
138 | */ |
||
139 | public function on($event, $callback) |
||
144 | |||
145 | /** |
||
146 | * Create runner instance |
||
147 | * @param Int $port |
||
148 | * @param String $host |
||
149 | * @return Server |
||
150 | */ |
||
151 | public function listen($port, $host = "127.0.0.1") |
||
158 | |||
159 | /** |
||
160 | * @param string $name method to call |
||
161 | * @param array $arguments |
||
162 | */ |
||
163 | public function __call($name, $arguments) |
||
167 | } |
||
168 |
Our type inference engine has found an assignment to a property that is incompatible with the declared type of that property.
Either this assignment is in error or the assigned type should be added to the documentation/type hint for that property..