You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

25 lines
904 B

  1. #!/usr/bin/env php
  2. <?php
  3. use PhpOffice\PhpSpreadsheet\Calculation\Calculation;
  4. use PhpOffice\PhpSpreadsheet\DocumentGenerator;
  5. require_once __DIR__ . '/../src/Bootstrap.php';
  6. try {
  7. $phpSpreadsheetFunctionsProperty = (new ReflectionClass(Calculation::class))->getProperty('phpSpreadsheetFunctions');
  8. $phpSpreadsheetFunctionsProperty->setAccessible(true);
  9. $phpSpreadsheetFunctions = $phpSpreadsheetFunctionsProperty->getValue();
  10. ksort($phpSpreadsheetFunctions);
  11. file_put_contents(__DIR__ . '/../docs/references/function-list-by-category.md',
  12. DocumentGenerator::generateFunctionListByCategory($phpSpreadsheetFunctions)
  13. );
  14. file_put_contents(__DIR__ . '/../docs/references/function-list-by-name.md',
  15. DocumentGenerator::generateFunctionListByName($phpSpreadsheetFunctions)
  16. );
  17. } catch (ReflectionException $e) {
  18. fwrite(STDERR, (string)$e);
  19. exit(1);
  20. }