Arrays

Description of array.

Variables

Description of variables.

Variable Description
$identifier

Used to identify the array, which can then be used as the passing parameter to the load function.

$name

Used to display a readable name for the array.

$description

Used to store a readable description for the array.

$items

An actual generic array item conforming to native php.

$size

The total amount of the array items.

$count

The maximum count for the arrays items, useful when performing loop functions as the count is equal to the last accessible index of the array.

$parent

Stores a reference to the parent object or array of this array if one exists.

$root

Stores a reference to the root object or array holding this array if one exists.

$original

Stores a backup of the original array before being saved incase you wish to revert any changes back to its initial load state.

$valid

Returns true or false depending on whether or not the array is valid, and or can or cannot be used in a for-loop.

$type

If the array item is classed as a User object, this would be set to User. Alternatively, this can also be a preset array providing the desired type of variable for each index.

Functions

Description of functions.

Function Description
create()

Create an empty array.

clone()

Clone the current current.

load(string)

Load array data from a saved array.

fill(integer)

Fill an array with empty values until it reaches a certain size.

insert(data, integer)

Insert data or an item at the provided position.

append(data)

Add data or an item to the end of the array.

save()

Save the array.

reload()

Reload the array from its last save.

item(integer)

Return the item at the provided index.

replace(integer, data)

Replace the item at the provided index, with the newly passed item.

replace_range([integer], [data])

Replace the items at the provided indexes with the passed items.

remove(integer)

Remove the item located at the passed index.

remove_range([integer])

Remove all items located at the indexes passed.

remove_types([type])

Remove all items that are of the provided types.

clear()

Clear the entire array.

contents()

Return all contents of the array.

content_types()

Return the content types of each value in the array index.

contents_of_type(type)

Return all contents that are of the provided type.

contains(data)

Returns true if the array contains the provided data.

restore()

Restore the array from the original variable.

contains_type(type)

Returns true if the array contains the provided type.

contains_types([type])

Returns true if the array contains all the provided types.

update()

Updates the arrays variable data.

to_string()

Returns a JSON Object and String representing the array.

print()

Prints the array items to the screen.

search(data, integer)

Search for the provided data, and return a quantity of results if any.

Cancel

Create Code

Create / Save
Variable or Function
variable
function
Variable or Initiator
Function Code
For Class
Name
Paramaters
Add
Description