Menu

## ListInterface extends Iterator, JsonSerializable, Countable
in

ListInterface.php : 12

ListInterface

##### Tags

author

  Lucas S. Vieira

### Table of Contents

#### Methods

append() : void
  Appends a list to another.
first() : mixed
  Get the first value of list
get() : mixed
  Get a value by it's key
has() : bool
  Check if a given key exists on list
last() : mixed
  Get the last value of list
push() : void
  Add a value to list
put() : void
  Put a object into list on given key
remove() : mixed
  Remove a value by it's key on list
toArray() : array<string|int, mixed>
  Return an array representation for list
values() : array<string|int, mixed>
  Return an array with list values only

### Methods

#### append()

ListInterface.php : 86

Appends a list to another.

`public append(ListInterface $list) : void`

##### Parameters

$list : ListInterface

  ListInterface object to append.

#### first()

ListInterface.php : 19

Get the first value of list

`public first() : mixed`

#### get()

ListInterface.php : 34

Get a value by it's key

`public get( $key) : mixed`

##### Parameters

$key :

  Key to verify on list.

#### has()

ListInterface.php : 57

Check if a given key exists on list

`public has( $key) : bool`

##### Parameters

$key :

  Key to verify on list.

##### Return values

bool —

True if key exists, false otherwise.

#### last()

ListInterface.php : 26

Get the last value of list

`public last() : mixed`

#### push()

ListInterface.php : 41

Add a value to list

`public push(mixed $value) : void`

##### Parameters

$value : mixed

  Value to add.

#### put()

ListInterface.php : 49

Put a object into list on given key

`public put(string|int $key, mixed $value) : void`

##### Parameters

$key : string|int

  Key for manage the value.

$value : mixed

  Value to add.

#### remove()

ListInterface.php : 65

Remove a value by it's key on list

`public remove( $key) : mixed`

##### Parameters

$key :

  Key to remove from list.

#### toArray()

ListInterface.php : 72

Return an array representation for list

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

##### Return values

array<string|int, mixed>

#### values()

ListInterface.php : 79

Return an array with list values only

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

##### Return values

array<string|int, mixed>

## Search results