generator.php 936 B

1234567891011121314151617181920212223242526272829303132
  1. #!/usr/bin/env php
  2. <?php
  3. /**
  4. * To generate IDE help files of Swoole.
  5. */
  6. require_once dirname(__DIR__) . '/vendor/autoload.php';
  7. use Swoole\IDEHelper\AbstractStubGenerator;
  8. use Swoole\IDEHelper\StubGenerators\Swoole;
  9. use Swoole\IDEHelper\StubGenerators\SwooleAsync;
  10. use Swoole\IDEHelper\StubGenerators\SwooleLib;
  11. use Swoole\IDEHelper\StubGenerators\SwooleOrm;
  12. use Swoole\IDEHelper\StubGenerators\SwoolePostgresql;
  13. use Swoole\IDEHelper\StubGenerators\SwooleSerialize;
  14. use Swoole\IDEHelper\StubGenerators\SwooleZookeeper;
  15. /** @var AbstractStubGenerator[] $generators */
  16. $generators = [
  17. new Swoole(),
  18. new SwooleLib(),
  19. new SwooleAsync(),
  20. new SwooleOrm(),
  21. new SwoolePostgresql(),
  22. new SwooleSerialize(),
  23. new SwooleZookeeper(),
  24. ];
  25. foreach ($generators as $generator) {
  26. $generator->export();
  27. echo "IDE help files for {$generator->getExtension()} {$generator->getVersion()} generated successfully.\n";
  28. }