firewall, plugin. move parseIsComment to abstract class for reuse

This commit is contained in:
Ad Schellevis 2017-12-15 16:36:15 +01:00
parent 59d9f79a79
commit a5a4cde245
2 changed files with 10 additions and 10 deletions

View File

@ -65,16 +65,6 @@ class FilterRule extends Rule
'label' => 'parsePlain,label ",",63'
);
/**
* output parsing
* @param string $value field value
* @return string
*/
private function parseIsComment($value)
{
return !empty($value) ? "#" : "";
}
/**
* parse plain data
* @param string $value field value

View File

@ -50,6 +50,16 @@ abstract class Rule
$this->rule = $conf;
}
/**
* output parsing
* @param string $value field value
* @return string
*/
protected function parseIsComment($value)
{
return !empty($value) ? "#" : "";
}
/**
* convert source/destination address entries as used by the gui
* @param array $rule rule