public function text($value, $rule, $showSymbol = true)
{
$data = $this->_format($value, $rule);
$rData = $this->get($rule);
$symbol = $showSymbol ? $rData['symbol'] : '';
$result = str_replace(array('%v', '%s'), array($data['value'], $symbol), $data['template']);
$result = trim($result);
return $result;
}
/** * @param $rule * @return string * @throws \JBZoo\SimpleTypes\Exception */ public function noStyle($rule = null) { $rule = $rule ? $this->_parser->checkRule($rule) : $this->_rule; $this->log('Formatted output in "' . $rule . '" as "noStyle"'); return $this->_formatter->text($this->val($rule), $rule, false); }