PHP 클래스 Gajus\Dora\Input

파일 보기 프로젝트 열기: gajus/dora

공개 메소드들

메소드 설명
__construct ( string $name, array $attributes = null, array $properties = null, null | string $template = null )
__toString ( )
deriveName ( $name_path ) : string Convert array selector representation (['baz', 'foo_bar']) to English friendly representation (Bar Foo Bar).
getAttribute ( $name ) : null | string If [id] is undefined at the time of request, Dora will use instance UID.
getNamePath ( ) : array Parse input[name] into an array reprensentation.
getProperty ( string $name ) : mixed
getUid ( )
getValue ( ) : mixed
setProperty ( string $name, mixed $value ) : mixed
toString ( )

비공개 메소드들

메소드 설명
setAttribute ( string $name, string $value ) Type checking ommission is intentional. PHP does not provide scalar data type hinting. Non-scallar variables will thrown an error when cast to string. Manual validation is an unnecessary overhead.
stringifyAttributes ( ) Generate string representation of the input attributes.

메소드 상세

__construct() 공개 메소드

public __construct ( string $name, array $attributes = null, array $properties = null, null | string $template = null )
$name string Input name.
$attributes array HTML attributes.
$properties array Input properties, e.g. input name.
$template null | string

__toString() 공개 메소드

public __toString ( )

deriveName() 공개 정적인 메소드

If selector name is ends with "_id", then Id is dropped off the name.
public static deriveName ( $name_path ) : string
리턴 string

getAttribute() 공개 메소드

If [id] is undefined at the time of request, Dora will use instance UID.
public getAttribute ( $name ) : null | string
리턴 null | string Attribute value.

getNamePath() 공개 메소드

Parse input[name] into an array reprensentation.
public getNamePath ( ) : array
리턴 array [name="a[b][c][]"] is represented ['a', 'b', 'c'].

getProperty() 공개 메소드

public getProperty ( string $name ) : mixed
$name string Name of the property.
리턴 mixed

getUid() 공개 메소드

public getUid ( )

getValue() 공개 메소드

public getValue ( ) : mixed
리턴 mixed

setProperty() 공개 메소드

public setProperty ( string $name, mixed $value ) : mixed
$name string Name of the property.
$value mixed
리턴 mixed

toString() 공개 메소드

public toString ( )