PHP 클래스 mpyw\Co\Internal\GeneratorContainer

파일 보기 프로젝트 열기: mpyw/co 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( Generator $g, $yield_key = null ) Constructor.
__toString ( ) : string Return generator hash.
current ( ) : mixed Return current value.
getReturnOrThrown ( ) : mixed Return value that generator has returned or thrown.
getYieldKey ( ) : mixed Return parent yield key.
key ( ) : mixed Return current key.
send ( mixed $value ) Send value into generator.
throw_ ( Throwable | Exception $e ) Throw exception into generator.
thrown ( ) : boolean Return whether Throwable is thrown.
valid ( ) : boolean Return whether generator is actually working.

비공개 메소드들

메소드 설명
validateInvalidity ( ) Validate that generator is still running.
validateValidity ( ) Validate that generator has finished running.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( Generator $g, $yield_key = null )
$g Generator

__toString() 공개 메소드

Return generator hash.
public __toString ( ) : string
리턴 string

current() 공개 메소드

Return current value.
public current ( ) : mixed
리턴 mixed

getReturnOrThrown() 공개 메소드

Return value that generator has returned or thrown.
public getReturnOrThrown ( ) : mixed
리턴 mixed

getYieldKey() 공개 메소드

Return parent yield key.
public getYieldKey ( ) : mixed
리턴 mixed

key() 공개 메소드

Return current key.
public key ( ) : mixed
리턴 mixed

send() 공개 메소드

Send value into generator.
public send ( mixed $value )
$value mixed

throw_() 공개 메소드

Throw exception into generator.
public throw_ ( Throwable | Exception $e )
$e Throwable | Exception

thrown() 공개 메소드

Return whether Throwable is thrown.
public thrown ( ) : boolean
리턴 boolean

valid() 공개 메소드

Return whether generator is actually working.
public valid ( ) : boolean
리턴 boolean