class ctools_math_expr_stack

  1. nittany7 modules/contrib/ctools/includes/math-expr.inc ctools_math_expr_stack
  2. cis7 modules/contrib/ctools/includes/math-expr.inc ctools_math_expr_stack
  3. mooc7 modules/contrib/ctools/includes/math-expr.inc ctools_math_expr_stack

Hierarchy

Expanded class hierarchy of ctools_math_expr_stack

Members

Contains filters are case sensitive

File

modules/contrib/ctools/includes/math-expr.inc, line 366

View source
class ctools_math_expr_stack {

  var $stack = array();
  var $count = 0;

  function push($val) {
    $this->stack[$this->count] = $val;
    $this->count++;
  }

  function pop() {
    if ($this->count > 0) {
      $this->count--;
      return $this->stack[$this->count];
    }
    return null;
  }

  function last($n = 1) {
    return !empty($this->stack[$this->count -$n]) ? $this->stack[$this->count -$n] : NULL;
  }
}