From a07dd58fc7a6dc65ab4c5d333307a54d841797a7 Mon Sep 17 00:00:00 2001 From: Mark Baker Date: Tue, 22 Feb 2011 13:57:15 +0000 Subject: [PATCH] Added listAllFunctionNames() method to the Calculation Engine, and modified the listFunctionNames() method to return only implemented functions git-svn-id: https://phpexcel.svn.codeplex.com/svn/trunk@69154 2327b42d-5241-43d6-9e2a-de5ac946f064 --- Classes/PHPExcel/Calculation.php | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/Classes/PHPExcel/Calculation.php b/Classes/PHPExcel/Calculation.php index da72e763..f6060882 100644 --- a/Classes/PHPExcel/Calculation.php +++ b/Classes/PHPExcel/Calculation.php @@ -3737,13 +3737,32 @@ class PHPExcel_Calculation { } // function listFunctions() + /** + * Get a list of all Excel function names + * + * @return array + */ + public function listAllFunctionNames() { + return array_keys(self::$_PHPExcelFunctions); + } // function listAllFunctionNames() + /** * Get a list of implemented Excel function names * * @return array */ public function listFunctionNames() { - return array_keys(self::$_PHPExcelFunctions); + // Return value + $returnValue = array(); + // Loop functions + foreach(self::$_PHPExcelFunctions as $functionName => $function) { + if ($function['functionCall'] != 'PHPExcel_Calculation_Functions::DUMMY') { + $returnValue[] = $functionName; + } + } + + // Return + return $returnValue; } // function listFunctionNames() } // class PHPExcel_Calculation