Documentation

IArrayList

Interface for lists

Table of Contents

Methods

Add()  : mixed
Adds an item to the collection.
Append()  : void
Appends one or many items to the end of list.
Count()  : int
Returns the number of records in the array.
Delete()  : bool
Deletes an item from the collection.
DeleteAt()  : array<string|int, mixed>
Deletes an item from the collection at the specified index.
First()  : mixed
Returns the first item in the list.
Item()  : mixed
Retrieves an item from the collection at the specified index.
Last()  : mixed
Returns the last item in the list.
ToArray()  : array<string|int, mixed>
Returns an array of values.
ToString()  : string
Converts the object to a string representation.

Methods

Add()

Adds an item to the collection.

public Add(mixed $value) : mixed
Parameters
$value : mixed

The item to add.

Return values
mixed

The updated collection after adding the item.

Append()

Appends one or many items to the end of list.

public Append(mixed $values) : void
Parameters
$values : mixed

Count()

Returns the number of records in the array.

public Count() : int
Return values
int

Delete()

Deletes an item from the collection.

public Delete(mixed $value) : bool
Parameters
$value : mixed

The item to delete.

Return values
bool

True if the item was successfully deleted, false otherwise.

DeleteAt()

Deletes an item from the collection at the specified index.

public DeleteAt(int $index) : array<string|int, mixed>
Parameters
$index : int

The index of the item to delete.

Return values
array<string|int, mixed>

The updated collection after removing the item.

First()

Returns the first item in the list.

public First() : mixed

Item()

Retrieves an item from the collection at the specified index.

public Item(int $index) : mixed
Parameters
$index : int

The index of the item to retrieve.

Return values
mixed

The item at the specified index.

Last()

Returns the last item in the list.

public Last() : mixed

ToArray()

Returns an array of values.

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

ToString()

Converts the object to a string representation.

public ToString([string $splitter = ',' ]) : string
Parameters
$splitter : string = ','

The delimiter to use when joining elements.

Return values
string

The string representation of the object.


        
On this page

Search results