ResetConfig.php 345 B

12345678910111213141516171819
  1. <?php
  2. namespace think\swoole\resetters;
  3. use think\Container;
  4. use think\swoole\Sandbox;
  5. use think\swoole\contract\ResetterInterface;
  6. class ResetConfig implements ResetterInterface
  7. {
  8. public function handle(Container $app, Sandbox $sandbox)
  9. {
  10. $app->instance('config', clone $sandbox->getConfig());
  11. return $app;
  12. }
  13. }