MathParser\Parsing\Stack Class Reference

Utility class, implementing a simple FIFO stack. More...

Public Member Functions

 push ($element)
 Push an element onto the stack. More...
 
 peek ()
 Return the top element (without popping it) More...
 
 pop ()
 Return the top element and remove it from the stack. More...
 
 count ()
 Return the current number of elements in the stack. More...
 
 isEmpty ()
 Returns true if the stack is empty. More...
 
 __toString ()
 

Protected Attributes

 $data = array()
 mixed[] $data internal storage of data on the stack. More...
 

Detailed Description

Utility class, implementing a simple FIFO stack.

Member Function Documentation

MathParser\Parsing\Stack::count ( )

Return the current number of elements in the stack.

Return values
int
MathParser\Parsing\Stack::isEmpty ( )

Returns true if the stack is empty.

Return values
boolean
MathParser\Parsing\Stack::peek ( )

Return the top element (without popping it)

Return values
mixed
MathParser\Parsing\Stack::pop ( )

Return the top element and remove it from the stack.

Return values
mixed
MathParser\Parsing\Stack::push (   $element)

Push an element onto the stack.

Parameters
mixed$element

Member Data Documentation

MathParser\Parsing\Stack::$data = array()
protected

mixed[] $data internal storage of data on the stack.


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