PHP Class Pop\Validator\Validator

Author: Nick Sagona, III ([email protected])
Inheritance: implements Pop\Validator\ValidatorInterface
Datei anzeigen Open project: nicksagona/PopPHP

Protected Properties

Property Type Description
$condition boolean Validator condition
$defaultMessage string Validator default message
$input mixed Input value to test
$result boolean Validator test result
$value mixed Validator value to test against

Public Methods

Method Description
__construct ( mixed $value = null, string $msg = null, boolean $condition = true ) : Validator Constructor
factory ( mixed $value = null, string $msg = null, boolean $condition = true ) : Validator Static method to instantiate the validator object and return itself to facilitate chaining methods together.
getCondition ( ) : boolean Method to get the validator condition
getInput ( ) : mixed Method to get the validator input
getMessage ( ) : boolean Method to get the validator default message
getValue ( ) : mixed Method to get the validator value
setCondition ( boolean $condition ) : Pop\Validator\ValidatorInterface Method to set the validator condition
setInput ( mixed $input ) : Pop\Validator\ValidatorInterface Method to set the validator input
setMessage ( string $message ) : Pop\Validator\ValidatorInterface Method to set the validator condition
setValue ( mixed $value ) : Pop\Validator\ValidatorInterface Method to set the validator value

Method Details

__construct() public method

Instantiate the validator object
public __construct ( mixed $value = null, string $msg = null, boolean $condition = true ) : Validator
$value mixed
$msg string
$condition boolean
return Validator

factory() public static method

Static method to instantiate the validator object and return itself to facilitate chaining methods together.
public static factory ( mixed $value = null, string $msg = null, boolean $condition = true ) : Validator
$value mixed
$msg string
$condition boolean
return Validator

getCondition() public method

Method to get the validator condition
public getCondition ( ) : boolean
return boolean

getInput() public method

Method to get the validator input
public getInput ( ) : mixed
return mixed

getMessage() public method

Method to get the validator default message
public getMessage ( ) : boolean
return boolean

getValue() public method

Method to get the validator value
public getValue ( ) : mixed
return mixed

setCondition() public method

Method to set the validator condition
public setCondition ( boolean $condition ) : Pop\Validator\ValidatorInterface
$condition boolean
return Pop\Validator\ValidatorInterface

setInput() public method

Method to set the validator input
public setInput ( mixed $input ) : Pop\Validator\ValidatorInterface
$input mixed
return Pop\Validator\ValidatorInterface

setMessage() public method

Method to set the validator condition
public setMessage ( string $message ) : Pop\Validator\ValidatorInterface
$message string
return Pop\Validator\ValidatorInterface

setValue() public method

Method to set the validator value
public setValue ( mixed $value ) : Pop\Validator\ValidatorInterface
$value mixed
return Pop\Validator\ValidatorInterface

Property Details

$condition protected_oe property

Validator condition
protected bool $condition
return boolean

$defaultMessage protected_oe property

Validator default message
protected string $defaultMessage
return string

$input protected_oe property

Input value to test
protected mixed $input
return mixed

$result protected_oe property

Validator test result
protected bool $result
return boolean

$value protected_oe property

Validator value to test against
protected mixed $value
return mixed