_attributes['title'] = 'An IPv4 address like 1.2.3.4 or an IPv6 address like 1:2a:3b:ffff::1'; break; case "V4": $this->_attributes['title'] = 'An IPv4 address like 1.2.3.4'; break; case "V6": $this->_attributes['title'] = 'An IPv6 address like 1:2a:3b:ffff::1'; case "ALIASV4V6": $this->_attributes['title'] = 'An IPv4 address like 1.2.3.4 or an IPv6 address like 1:2a:3b:ffff::1 or an alias'; break; case "ALIASV4": $this->_attributes['title'] = 'An IPv4 address like 1.2.3.4 or an alias'; break; case "ALIASV6": $this->_attributes['title'] = 'An IPv6 address like 1:2a:3b:ffff::1 or an alias'; break; case "HOSTV4V6": $this->_attributes['title'] = 'An IPv4 address like 1.2.3.4 or an IPv6 address like 1:2a:3b:ffff::1 or a host name like myhost.example.com'; break; case "HOSTV4": $this->_attributes['title'] = 'An IPv4 address like 1.2.3.4 or a host name like myhost.example.com'; break; case "HOSTV6": $this->_attributes['title'] = 'An IPv6 address like 1:2a:3b:ffff::1 or a host name like myhost.example.com'; break; } } // $min is provided to allow for VPN masks in which '0' is valid public function addMask($name, $value, $max = 128, $min = 1) { $this->_mask = new Form_Select( $name, null, $value, array_combine(range($max, $min), range($max, $min)) ); $this->_mask->addClass("pfIpMask"); return $this; } public function setIsRepeated() { if (isset($this->_mask)) $this->_mask->setIsRepeated(); return parent::setIsRepeated(); } protected function _getInput() { $input = parent::_getInput(); if (!isset($this->_mask)) return $input; return << $input / {$this->_mask} EOT; } }