Menu

## Stack
in package

Stack.php : 10

Class Stack

### Table of Contents

$data : array<string|int, mixed>
__construct() : mixed
clear() : void
  Removes all the items from the stack and resets it.
count() : int
  Retrieve the total number of items in the stack.
empty() : void
  Alias of clear method.
isEmpty() : bool
  Returns true if the stack is empty, false otherwise.
peek() : mixed
  Retrieves the next item in the stack without removing it.
pop() : mixed
push() : void
  Adds an object to the stack.
toArray() : array<string|int, mixed>
  Retrieve the list of objects and return as an array.

### Properties

#### $data

Stack.php : 13
`protected array<string|int, mixed> $data`

### Methods

#### __construct()

Stack.php : 15
`public __construct() : mixed`

##### Return values

mixed —

#### clear()

Stack.php : 82

Removes all the items from the stack and resets it.

`public clear() : void`

##### Return values

void —

#### count()

Stack.php : 36

Retrieve the total number of items in the stack.

`public count() : int`

##### Return values

int —

#### empty()

Stack.php : 90

Alias of clear method.

`public empty() : void`

##### Return values

void —

#### isEmpty()

Stack.php : 24

Returns true if the stack is empty, false otherwise.

`public isEmpty() : bool`

##### Return values

bool —

#### peek()

Stack.php : 62

Retrieves the next item in the stack without removing it.

`public peek() : mixed`

##### Return values

mixed —

#### pop()

Stack.php : 70
`public pop() : mixed`

##### Return values

mixed —

#### push()

Stack.php : 54

Adds an object to the stack.

`public push( $object) : void`

##### Parameters

$object :

##### Return values

void —

#### toArray()

Stack.php : 45

Retrieve the list of objects and return as an array.

`public toArray() : array<string|int, mixed>`

##### Return values

array<string|int, mixed> —

## Search results