Linna Typed Array

AbstractArray extends ArrayObject
in package

Provide a way to create an array of typed elements with php.

Tags
link
https://www.php.net/manual/en/class.arrayobject.php

Table of Contents

NO_FLAGS  = 0
__construct()  : mixed
Class Contructor.
append()  : void
Append a value at the end of the array.

Constants

NO_FLAGS

public int NO_FLAGS = 0

NO_FLAGS Used as default value for the parameter $flags.

Methods

__construct()

Class Contructor.

public __construct(Closure $func[, array<string|int, mixed> $input = [] ][, int $flags = AbstractArray::NO_FLAGS ][, class-string $iterator_class = ArrayIterator::class ]) : mixed
Parameters
$func : Closure

Function to check the array values.

$input : array<string|int, mixed> = []

Array of values.

$flags : int = AbstractArray::NO_FLAGS

Flags to control the behaviour of the ArrayObject object. See array object on php site.

$iterator_class : class-string = ArrayIterator::class

Specify the class that will be used for iteration of the ArrayObject object. The class must implement ArrayIterator.

Tags
throws
InvalidArgumentException

If elements in the optional array parameter aren't of the configured type.

Return values
mixed

append()

Append a value at the end of the array.

public append(mixed $value) : void
Parameters
$value : mixed
Tags
throws
InvalidArgumentException

If value passed with $value are not of the string type

Return values
void

Search results