mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-16 17:44:41 +00:00
firewall, plugin. move parseIsComment to abstract class for reuse
This commit is contained in:
parent
59d9f79a79
commit
a5a4cde245
@ -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
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user