public function getIPRules()
    {
        $rules = [];
        if ($this->enableIP & static::$ipv4) {
            $rules = [
                [[$this->ipAttribute],
                    'string', 'max' => 4
                ],
            ];
        }
        if ($this->enableIP & static::$ipv6) {
            $rules = [
                [[$this->ipAttribute],
                    'string', 'max' => 16
                ],
            ];
        }
        if ($this->enableIP & static::$ipAll) {
            $rules[] = [
                [$this->ipTypeAttribute], 'in', 'range' => [IP::IPv4, IP::IPv6],
            ];
        }
        return $rules;
    }
public function getIPRules()
    {
        $rules = [];
        if ($this->enableIP & static::$ipv4) {
            $rules = [
                [[$this->ipAttribute],
                    'string', 'max' => 4
                ],
            ];
        }
        if ($this->enableIP & static::$ipv6) {
            $rules = [
                [[$this->ipAttribute],
                    'string', 'max' => 16
                ],
            ];
        }
        if ($this->enableIP & static::$ipAll) {
            $rules[] = [
                [$this->ipTypeAttribute], 'in', 'range' => [IP::IPv4, IP::IPv6],
            ];
        }
        return $rules;
    }
public function getIPRules ( ) { $ rules = [ ] ; if ( $ this -> enableIP & static :: $ ipv4 ) { $ rules = [ [ [ $ this -> ipAttribute ] , 'string' , 'max' => 4 ] , ] ; } if ( $ this -> enableIP & static :: $ ipv6 ) { $ rules = [ [ [ $ this -> ipAttribute ] , 'string' , 'max' => 16 ] , ] ; } if ( $ this -> enableIP & static :: $ ipAll ) { $ rules [ ] = [ [ $ this -> ipTypeAttribute ] , 'in' , 'range' => [ IP :: IPv4 , IP :: IPv6 ] , ] ; } return $ rules ; }
Get the rules associated with ip attributes.
@return array
Get the rules associated with ip attributes .