PHP 클래스 Jyxo\Input\Chain

저자: Jakub Tománek
상속: implements Jyxo\Input\ValidatorInterface
파일 보기 프로젝트 열기: jyxo/php 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$value mixed Actual variable value.

공개 메소드들

메소드 설명
addCondition ( Conditional $chain ) : self Adds a new conditional subchain and returns its instance.
addFilter ( Jyxo\Input\FilterInterface $filter ) : self Adds a filter to the chain.
addValidator ( Jyxo\Input\ValidatorInterface $validator, string $errorMessage = null ) : Chain Adds a validator to the chain.
addWalk ( ) : self Adds a new subchain and returns its instance.
close ( ) : self In case of a subchain returns its parent, the chain itself otherwise.
getErrors ( ) : array Returns a list of validation errors.
getParent ( ) : self Returns the parent chain.
getValue ( ) : mixed Returns a filtered variable value.
isEmpty ( ) : boolean Returns if the chain contains any rules.
isValid ( mixed $value ) : boolean Returns if the value is valid.
setParent ( Chain $parent ) : self Sets the parent chain.

비공개 메소드들

메소드 설명
run ( mixed &$value ) : boolean Starts filtering and validation.

메소드 상세

addCondition() 공개 메소드

Adds a new conditional subchain and returns its instance.
public addCondition ( Conditional $chain ) : self
$chain Jyxo\Input\Chain\Conditional
리턴 self

addFilter() 공개 메소드

Adds a filter to the chain.
public addFilter ( Jyxo\Input\FilterInterface $filter ) : self
$filter Jyxo\Input\FilterInterface Filter
리턴 self

addValidator() 공개 메소드

Adds a validator to the chain.
public addValidator ( Jyxo\Input\ValidatorInterface $validator, string $errorMessage = null ) : Chain
$validator Jyxo\Input\ValidatorInterface Validator
$errorMessage string Validation error message
리턴 Chain

addWalk() 공개 메소드

Adds a new subchain and returns its instance.
public addWalk ( ) : self
리턴 self

close() 공개 메소드

In case of a subchain returns its parent, the chain itself otherwise.
public close ( ) : self
리턴 self

getErrors() 공개 메소드

Returns a list of validation errors.
public getErrors ( ) : array
리턴 array

getParent() 공개 메소드

Returns the parent chain.
public getParent ( ) : self
리턴 self

getValue() 공개 메소드

Returns a filtered variable value.
public getValue ( ) : mixed
리턴 mixed

isEmpty() 공개 메소드

Returns if the chain contains any rules.
public isEmpty ( ) : boolean
리턴 boolean

isValid() 공개 메소드

Returns if the value is valid.
public isValid ( mixed $value ) : boolean
$value mixed Input value
리턴 boolean

setParent() 공개 메소드

Sets the parent chain.
public setParent ( Chain $parent ) : self
$parent Chain Parent chain
리턴 self

프로퍼티 상세

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

Actual variable value.
protected mixed $value
리턴 mixed