PHP 클래스 Pop\Form\Element

저자: Nick Sagona, III ([email protected])
상속: extends Pop\Dom\Child
파일 보기 프로젝트 열기: nicksagona/PopPHP 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$allowedTypes array Form element allowed types
$errorDisplay array Form element error display format
$errors array Form element errors
$label string Form element label
$labelAttributes array Form element label attributes
$marked string | array Form element marked value(s)
$name string Element name
$required boolean Form element required property
$type string Element type
$validators array Form element validators
$value string | array Form element value(s)

공개 메소드들

메소드 설명
__construct ( string $type, string $name, string $value = null, string | array $marked = null, string $indent = null ) : Element Constructor
addValidator ( mixed $validator ) : Element Add a validator the form element object.
clearErrors ( ) : Element Clear errors.
getErrors ( ) : array Get form element object errors.
getLabel ( ) : string Get form element object label.
getLabelAttributes ( ) : array Get the attributes of the form element object label.
getMarked ( ) : mixed Get form element object marked values.
getName ( ) : string Get form element object name.
getType ( ) : string Get form element object type.
getValidators ( ) : array Get validators
getValue ( ) : mixed Get form element object value.
hasErrors ( ) : array Get if form element object has errors.
isCaptcha ( ) : boolean Get whether the form element object is a captcha element.
isCheckbox ( ) : boolean Get whether the form element object is a checkbox element.
isCsrf ( ) : boolean Get whether the form element object is a csrf element.
isMultiple ( ) : boolean Get whether the form element object can have multiple input values.
isRadio ( ) : boolean Get whether the form element object is a radio element.
isRequired ( ) : boolean Get whether the form element object is required.
isSelect ( ) : boolean Get whether the form element object is a select element.
isTextarea ( ) : boolean Get whether the form element object is a textarea element.
output ( ) : string Method to render the child and its child nodes.
render ( boolean $ret = false, integer $depth, string $indent = null, string $errorIndent = null ) : string Method to render the child and its child nodes.
setErrorDisplay ( string $container, array $attribs, boolean $pre = false ) : Element Set error display values
setErrorPost ( boolean $post = true ) : Element Set error post-display
setErrorPre ( boolean $pre = true ) : Element Set error pre-display
setLabel ( mixed $label ) : Element Set the label of the form element object.
setLabelAttributes ( array $attribs ) : Element Set the attributes of the label of the form element object.
setMarked ( mixed $marked ) : Element Set the marked value of the form element object.
setName ( string $name ) : Element Set the name of the form element object.
setRequired ( boolean $required ) : Element Set whether the form element object is required.
setValidators ( array $validators = [] ) : Element Set validators
setValue ( mixed $value ) : Element Set the value of the form element object.
validate ( ) : boolean Validate the form element object.

메소드 상세

__construct() 공개 메소드

Instantiate the form element object
public __construct ( string $type, string $name, string $value = null, string | array $marked = null, string $indent = null ) : Element
$type string
$name string
$value string
$marked string | array
$indent string
리턴 Element

addValidator() 공개 메소드

Add a validator the form element object.
public addValidator ( mixed $validator ) : Element
$validator mixed
리턴 Element

clearErrors() 공개 메소드

Clear errors.
public clearErrors ( ) : Element
리턴 Element

getErrors() 공개 메소드

Get form element object errors.
public getErrors ( ) : array
리턴 array

getLabel() 공개 메소드

Get form element object label.
public getLabel ( ) : string
리턴 string

getLabelAttributes() 공개 메소드

Get the attributes of the form element object label.
public getLabelAttributes ( ) : array
리턴 array

getMarked() 공개 메소드

Get form element object marked values.
public getMarked ( ) : mixed
리턴 mixed

getName() 공개 메소드

Get form element object name.
public getName ( ) : string
리턴 string

getType() 공개 메소드

Get form element object type.
public getType ( ) : string
리턴 string

getValidators() 공개 메소드

Get validators
public getValidators ( ) : array
리턴 array

getValue() 공개 메소드

Get form element object value.
public getValue ( ) : mixed
리턴 mixed

hasErrors() 공개 메소드

Get if form element object has errors.
public hasErrors ( ) : array
리턴 array

isCaptcha() 공개 메소드

Get whether the form element object is a captcha element.
public isCaptcha ( ) : boolean
리턴 boolean

isCheckbox() 공개 메소드

Get whether the form element object is a checkbox element.
public isCheckbox ( ) : boolean
리턴 boolean

isCsrf() 공개 메소드

Get whether the form element object is a csrf element.
public isCsrf ( ) : boolean
리턴 boolean

isMultiple() 공개 메소드

Get whether the form element object can have multiple input values.
public isMultiple ( ) : boolean
리턴 boolean

isRadio() 공개 메소드

Get whether the form element object is a radio element.
public isRadio ( ) : boolean
리턴 boolean

isRequired() 공개 메소드

Get whether the form element object is required.
public isRequired ( ) : boolean
리턴 boolean

isSelect() 공개 메소드

Get whether the form element object is a select element.
public isSelect ( ) : boolean
리턴 boolean

isTextarea() 공개 메소드

Get whether the form element object is a textarea element.
public isTextarea ( ) : boolean
리턴 boolean

output() 공개 메소드

Method to render the child and its child nodes.
public output ( ) : string
리턴 string

render() 공개 메소드

Method to render the child and its child nodes.
public render ( boolean $ret = false, integer $depth, string $indent = null, string $errorIndent = null ) : string
$ret boolean
$depth integer
$indent string
$errorIndent string
리턴 string

setErrorDisplay() 공개 메소드

Set error display values
public setErrorDisplay ( string $container, array $attribs, boolean $pre = false ) : Element
$container string
$attribs array
$pre boolean
리턴 Element

setErrorPost() 공개 메소드

Set error post-display
public setErrorPost ( boolean $post = true ) : Element
$post boolean
리턴 Element

setErrorPre() 공개 메소드

Set error pre-display
public setErrorPre ( boolean $pre = true ) : Element
$pre boolean
리턴 Element

setLabel() 공개 메소드

Set the label of the form element object.
public setLabel ( mixed $label ) : Element
$label mixed
리턴 Element

setLabelAttributes() 공개 메소드

Set the attributes of the label of the form element object.
public setLabelAttributes ( array $attribs ) : Element
$attribs array
리턴 Element

setMarked() 공개 메소드

Set the marked value of the form element object.
public setMarked ( mixed $marked ) : Element
$marked mixed
리턴 Element

setName() 공개 메소드

Set the name of the form element object.
public setName ( string $name ) : Element
$name string
리턴 Element

setRequired() 공개 메소드

Set whether the form element object is required.
public setRequired ( boolean $required ) : Element
$required boolean
리턴 Element

setValidators() 공개 메소드

Set validators
public setValidators ( array $validators = [] ) : Element
$validators array
리턴 Element

setValue() 공개 메소드

Set the value of the form element object.
public setValue ( mixed $value ) : Element
$value mixed
리턴 Element

validate() 공개 메소드

Validate the form element object.
public validate ( ) : boolean
리턴 boolean

프로퍼티 상세

$allowedTypes 보호되어 있는 프로퍼티

Form element allowed types
protected array $allowedTypes
리턴 array

$errorDisplay 보호되어 있는 프로퍼티

Form element error display format
protected array $errorDisplay
리턴 array

$errors 보호되어 있는 프로퍼티

Form element errors
protected array $errors
리턴 array

$label 보호되어 있는 프로퍼티

Form element label
protected string $label
리턴 string

$labelAttributes 보호되어 있는 프로퍼티

Form element label attributes
protected array $labelAttributes
리턴 array

$marked 보호되어 있는 프로퍼티

Form element marked value(s)
protected string|array $marked
리턴 string | array

$name 보호되어 있는 프로퍼티

Element name
protected string $name
리턴 string

$required 보호되어 있는 프로퍼티

Form element required property
protected bool $required
리턴 boolean

$type 보호되어 있는 프로퍼티

Element type
protected string $type
리턴 string

$validators 보호되어 있는 프로퍼티

Form element validators
protected array $validators
리턴 array

$value 보호되어 있는 프로퍼티

Form element value(s)
protected string|array $value
리턴 string | array