PHP Класс nspl\ds\Collection

Наследование: implements ArrayAccess, implements Iterator, implements Countable
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$array array
$valid integer

Открытые методы

Метод Описание
__toString ( ) : string
count ( ) : integer
current ( ) : mixed (PHP 5 >= 5.0.0)
Return the current element
key ( ) : mixed (PHP 5 >= 5.0.0)
Return the key of the current element
next ( ) : void (PHP 5 >= 5.0.0)
Move forward to next element
offsetExists ( mixed $index ) : boolean (PHP 5 >= 5.0.0)
Whether a offset exists
offsetGet ( integer $index ) : mixed (PHP 5 >= 5.0.0)
Offset to retrieve
offsetSet ( integer $index, mixed $value ) : void (PHP 5 >= 5.0.0)
Offset to set
offsetUnset ( integer $index ) : void (PHP 5 >= 5.0.0)
Offset to unset
rewind ( ) : void (PHP 5 >= 5.0.0)
Rewind the Iterator to the first element
toArray ( ) : array
valid ( ) : boolean (PHP 5 >= 5.0.0)
Checks if current position is valid

Защищенные методы

Метод Описание
stringifyArray ( array $array ) region __toString

Описание методов

__toString() публичный Метод

public __toString ( ) : string
Результат string

count() публичный Метод

public count ( ) : integer
Результат integer

current() публичный Метод

(PHP 5 >= 5.0.0)
Return the current element
public current ( ) : mixed
Результат mixed Can return any type.

key() публичный Метод

(PHP 5 >= 5.0.0)
Return the key of the current element
public key ( ) : mixed
Результат mixed scalar on success, or null on failure.

next() публичный Метод

(PHP 5 >= 5.0.0)
Move forward to next element
public next ( ) : void
Результат void Any returned value is ignored.

offsetExists() публичный Метод

(PHP 5 >= 5.0.0)
Whether a offset exists
public offsetExists ( mixed $index ) : boolean
$index mixed

An offset to check for.

Результат boolean true on success or false on failure.

The return value will be casted to boolean if non-boolean was returned.

offsetGet() публичный Метод

(PHP 5 >= 5.0.0)
Offset to retrieve
public offsetGet ( integer $index ) : mixed
$index integer

The offset to retrieve.

Результат mixed Can return all value types.

offsetSet() публичный Метод

(PHP 5 >= 5.0.0)
Offset to set
public offsetSet ( integer $index, mixed $value ) : void
$index integer

The offset to assign the value to.

$value mixed

The value to set.

Результат void

offsetUnset() публичный Метод

(PHP 5 >= 5.0.0)
Offset to unset
public offsetUnset ( integer $index ) : void
$index integer

The offset to unset.

Результат void

rewind() публичный Метод

(PHP 5 >= 5.0.0)
Rewind the Iterator to the first element
public rewind ( ) : void
Результат void Any returned value is ignored.

stringifyArray() защищенный Метод

region __toString
protected stringifyArray ( array $array )
$array array

toArray() публичный Метод

public toArray ( ) : array
Результат array

valid() публичный Метод

(PHP 5 >= 5.0.0)
Checks if current position is valid
public valid ( ) : boolean
Результат boolean The return value will be casted to boolean and then evaluated. Returns true on success or false on failure.

Описание свойств

$array защищенное свойство

protected array $array
Результат array

$valid защищенное свойство

protected int $valid
Результат integer