ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
PHPExcel_Calculation_Token_Stack Class Reference
+ Collaboration diagram for PHPExcel_Calculation_Token_Stack:

Public Member Functions

 count ()
 Return the number of entries on the stack. More...
 
 push ($type, $value, $reference=NULL)
 Push a new entry onto the stack. More...
 
 pop ()
 Pop the last entry from the stack. More...
 
 last ($n=1)
 Return an entry from the stack without removing it. More...
 
 clear ()
 Clear the stack. More...
 

Private Attributes

 $_stack = array()
 
 $_count = 0
 

Detailed Description

Definition at line 36 of file Stack.php.

Member Function Documentation

◆ clear()

PHPExcel_Calculation_Token_Stack::clear ( )

Clear the stack.

Definition at line 110 of file Stack.php.

References array.

110  {
111  $this->_stack = array();
112  $this->_count = 0;
113  }
Create styles array
The data for the language used.

◆ count()

PHPExcel_Calculation_Token_Stack::count ( )

Return the number of entries on the stack.

Returns
integer

Definition at line 58 of file Stack.php.

References $_count.

58  {
59  return $this->_count;
60  } // function count()

◆ last()

PHPExcel_Calculation_Token_Stack::last (   $n = 1)

Return an entry from the stack without removing it.

Parameters
integer$nnumber indicating how far back in the stack we want to look
Returns
mixed

Definition at line 100 of file Stack.php.

References $n.

100  {
101  if ($this->_count - $n < 0) {
102  return NULL;
103  }
104  return $this->_stack[$this->_count - $n];
105  } // function last()
$n
Definition: RandomTest.php:85

◆ pop()

PHPExcel_Calculation_Token_Stack::pop ( )

Pop the last entry from the stack.

Returns
mixed

Definition at line 87 of file Stack.php.

References $_count.

87  {
88  if ($this->_count > 0) {
89  return $this->_stack[--$this->_count];
90  }
91  return NULL;
92  } // function pop()

◆ push()

PHPExcel_Calculation_Token_Stack::push (   $type,
  $value,
  $reference = NULL 
)

Push a new entry onto the stack.

Parameters
mixed$type
mixed$value
mixed$reference

Definition at line 69 of file Stack.php.

References $type, PHPExcel_Calculation\_localeFunc(), and array.

69  {
70  $this->_stack[$this->_count++] = array('type' => $type,
71  'value' => $value,
72  'reference' => $reference
73  );
74  if ($type == 'Function') {
75  $localeFunction = PHPExcel_Calculation::_localeFunc($value);
76  if ($localeFunction != $value) {
77  $this->_stack[($this->_count - 1)]['localeValue'] = $localeFunction;
78  }
79  }
80  } // function push()
$type
static _localeFunc($function)
Create styles array
The data for the language used.
+ Here is the call graph for this function:

Field Documentation

◆ $_count

PHPExcel_Calculation_Token_Stack::$_count = 0
private

Definition at line 50 of file Stack.php.

Referenced by count(), and pop().

◆ $_stack

PHPExcel_Calculation_Token_Stack::$_stack = array()
private

Definition at line 43 of file Stack.php.


The documentation for this class was generated from the following file: