| 
									
										
										
										
											2020-02-21 05:56:43 +00:00
										 |  |  | #!/usr/bin/env php | 
					
						
							|  |  |  | <?php | 
					
						
							|  |  |  | 
 | 
					
						
							| 
									
										
										
										
											2020-02-23 03:30:18 +00:00
										 |  |  | use PhpOffice\PhpSpreadsheet\Calculation\Calculation; | 
					
						
							| 
									
										
										
										
											2020-02-21 05:56:43 +00:00
										 |  |  | use PhpOffice\PhpSpreadsheet\DocumentGenerator; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | require_once __DIR__ . '/../src/Bootstrap.php'; | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | try { | 
					
						
							| 
									
										
										
										
											2020-02-23 03:30:18 +00:00
										 |  |  |     $phpSpreadsheetFunctionsProperty = (new ReflectionClass(Calculation::class))->getProperty('phpSpreadsheetFunctions'); | 
					
						
							|  |  |  |     $phpSpreadsheetFunctionsProperty->setAccessible(true); | 
					
						
							|  |  |  |     $phpSpreadsheetFunctions = $phpSpreadsheetFunctionsProperty->getValue(); | 
					
						
							|  |  |  |     ksort($phpSpreadsheetFunctions); | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  |     file_put_contents(__DIR__ . '/../docs/references/function-list-by-category.md', | 
					
						
							|  |  |  |         DocumentGenerator::generateFunctionListByCategory($phpSpreadsheetFunctions) | 
					
						
							|  |  |  |     ); | 
					
						
							|  |  |  |     file_put_contents(__DIR__ . '/../docs/references/function-list-by-name.md', | 
					
						
							|  |  |  |         DocumentGenerator::generateFunctionListByName($phpSpreadsheetFunctions) | 
					
						
							|  |  |  |     ); | 
					
						
							| 
									
										
										
										
											2020-02-21 05:56:43 +00:00
										 |  |  | } catch (ReflectionException $e) { | 
					
						
							|  |  |  |     fwrite(STDERR, (string)$e); | 
					
						
							|  |  |  |     exit(1); | 
					
						
							|  |  |  | } |