使用 GatewayWorker + redis 使用出现问题,
我在 Events.php 中做如下处理
```php
public static function onWorkerStart($businessWorker127.0.0.1',6379);
echo "启动redis\n";
public static function onMessage($client_id, $message) 中存储数据redis->zAdd($key, $i, $redis_str);
```
但是启动后,显示如下错误:
```log
PHP Notice: Undefined variable: redis in /GatewayWorker/Applications/YourApp/Events.php on line 149
Notice: Undefined variable: redis in /GatewayWorker/ApplicationsYourApp/Events.php on line 149
PHP Fatal error: Call to a member function zAdd() on a non-object in /GatewayWorker