You are here

function PHPExcel_Writer_Excel5_Parser::_convertFunction in Loft Data Grids 6.2

Same name and namespace in other branches
  1. 7.2 vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Parser.php \PHPExcel_Writer_Excel5_Parser::_convertFunction()

* Convert a function to a ptgFunc or ptgFuncVarV depending on the number of * args that it takes. * * @access private *

Parameters

string $token The name of the function for convertion to ptg value.: * @param integer $num_args The number of arguments the function receives. * @return string The packed ptg for the function

1 call to PHPExcel_Writer_Excel5_Parser::_convertFunction()
PHPExcel_Writer_Excel5_Parser::toReversePolish in vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Parser.php
* Builds a string containing the tree in reverse polish notation (What you * would use in a HP calculator stack). * The following tree: * * + * / \ * 2 3 * * produces: "23+" * * The following tree: * * + …

File

vendor/phpoffice/phpexcel/Classes/PHPExcel/Writer/Excel5/Parser.php, line 616

Class

PHPExcel_Writer_Excel5_Parser
PHPExcel_Writer_Excel5_Parser

Code

function _convertFunction($token, $num_args) {
  $args = $this->_functions[$token][1];

  //		$volatile = $this->_functions[$token][3];
  // Fixed number of args eg. TIME($i,$j,$k).
  if ($args >= 0) {
    return pack("Cv", $this->ptg['ptgFuncV'], $this->_functions[$token][0]);
  }

  // Variable number of args eg. SUM($i,$j,$k, ..).
  if ($args == -1) {
    return pack("CCv", $this->ptg['ptgFuncVarV'], $num_args, $this->_functions[$token][0]);
  }
}