PHP 클래스 nspl\ds\Collection

상속: implements ArrayAccess, implements Iterator, implements Countable
파일 보기 프로젝트 열기: ihor/Nspl

보호된 프로퍼티들

프로퍼티 타입 설명
$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