/**
* @param string $newRule
* @param bool $getClone
* @return $this
* @throws \JBZoo\SimpleTypes\Exception
*/
public function convert($newRule, $getClone = false)
{
if (!$newRule) {
$newRule = $this->_rule;
}
$newRule = $this->_parser->checkRule($newRule);
$obj = $getClone ? clone $this : $this;
if ($newRule !== $obj->_rule) {
$obj->_value = $obj->_customConvert($newRule, true);
$obj->_rule = $newRule;
}
return $obj;
}