Ubiquity 2.5.2
php rapid development framework
Loading...
Searching...
No Matches
IpValidator Class Reference

Validates an address ip Usage @validator("ip","4") Inspired from Bernhard Schussek Symfony IpValidator. More...

+ Inheritance diagram for IpValidator:

Public Member Functions

 __construct ()
 
 validate ($value)
 
 getParameters ()
 {{}
See also
\Ubiquity\contents\validation\validators\ValidatorInterfacegetParameters()
}
 
- Public Member Functions inherited from ValidatorHasNotNull
 asUI ()
 
- Public Member Functions inherited from Validator
 validate_ ($value)
 
 setValidationParameters ($member, $params, $severity='warning', $message=null)
 
 getMember ()
 
 setMember ($member)
 

Data Fields

const FLAGS
 

Protected Attributes

 $ref = Ip::V4
 
- Protected Attributes inherited from ValidatorHasNotNull
 $notNull
 
- Protected Attributes inherited from Validator
 $modifiedMessage
 
 $message
 
 $member
 
 $value
 
 $severity
 

Additional Inherited Members

- Protected Member Functions inherited from Validator
 setParams (array $params)
 
 mergeMessages ()
 
 _getMessage ()
 

Detailed Description

Validates an address ip Usage @validator("ip","4") Inspired from Bernhard Schussek Symfony IpValidator.

Author
jcheron myadd.nosp@m.ress.nosp@m.mail@.nosp@m.gmai.nosp@m.l.com
Version
1.0.1

Definition at line 15 of file IpValidator.php.

Constructor & Destructor Documentation

◆ __construct()

__construct ( )

Definition at line 30 of file IpValidator.php.

Member Function Documentation

◆ getParameters()

getParameters ( )

{{}

See also
\Ubiquity\contents\validation\validators\ValidatorInterfacegetParameters()
}

See also
\Ubiquity\contents\validation\validators\Validator::getParameters()

Reimplemented from Validator.

Definition at line 52 of file IpValidator.php.

◆ validate()

validate (   $value)
Parameters
mixed$value
Returns
boolean

Reimplemented from ValidatorHasNotNull.

Definition at line 34 of file IpValidator.php.

Field Documentation

◆ $ref

$ref = Ip::V4
protected

Definition at line 16 of file IpValidator.php.

◆ FLAGS

const FLAGS
Initial value:
= [
Ip::V4 => FILTER_FLAG_IPV4,
Ip::V6 => FILTER_FLAG_IPV6,
Ip::V4_NO_PRIV => FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE,
Ip::V6_NO_PRIV => FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE,
Ip::ALL_NO_PRIV => FILTER_FLAG_NO_PRIV_RANGE,
Ip::V4_NO_RES => FILTER_FLAG_IPV4 | FILTER_FLAG_NO_RES_RANGE,
Ip::V6_NO_RES => FILTER_FLAG_IPV6 | FILTER_FLAG_NO_RES_RANGE,
Ip::ALL_NO_RES => FILTER_FLAG_NO_RES_RANGE,
Ip::V4_ONLY_PUBLIC => FILTER_FLAG_IPV4 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE,
Ip::V6_ONLY_PUBLIC => FILTER_FLAG_IPV6 | FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE,
Ip::ALL_ONLY_PUBLIC => FILTER_FLAG_NO_PRIV_RANGE | FILTER_FLAG_NO_RES_RANGE ]

Definition at line 17 of file IpValidator.php.


The documentation for this class was generated from the following file: