PHP Class nspl\ds\Collection

Inheritance: implements ArrayAccess, implements Iterator, implements Countable
Afficher le fichier Open project: ihor/Nspl

Protected Properties

Свойство Type Description
$array array
$valid integer

Méthodes publiques

Méthode Description
__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

Méthodes protégées

Méthode Description
stringifyArray ( array $array ) region __toString

Method Details

__toString() public méthode

public __toString ( ) : string
Résultat string

count() public méthode

public count ( ) : integer
Résultat integer

current() public méthode

(PHP 5 >= 5.0.0)
Return the current element
public current ( ) : mixed
Résultat mixed Can return any type.

key() public méthode

(PHP 5 >= 5.0.0)
Return the key of the current element
public key ( ) : mixed
Résultat mixed scalar on success, or null on failure.

next() public méthode

(PHP 5 >= 5.0.0)
Move forward to next element
public next ( ) : void
Résultat void Any returned value is ignored.

offsetExists() public méthode

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

An offset to check for.

Résultat boolean true on success or false on failure.

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

offsetGet() public méthode

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

The offset to retrieve.

Résultat mixed Can return all value types.

offsetSet() public méthode

(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.

Résultat void

offsetUnset() public méthode

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

The offset to unset.

Résultat void

rewind() public méthode

(PHP 5 >= 5.0.0)
Rewind the Iterator to the first element
public rewind ( ) : void
Résultat void Any returned value is ignored.

stringifyArray() protected méthode

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

toArray() public méthode

public toArray ( ) : array
Résultat array

valid() public méthode

(PHP 5 >= 5.0.0)
Checks if current position is valid
public valid ( ) : boolean
Résultat boolean The return value will be casted to boolean and then evaluated. Returns true on success or false on failure.

Property Details

$array protected_oe property

protected array $array
Résultat array

$valid protected_oe property

protected int $valid
Résultat integer