public function get($rule)
{
if (array_key_exists($rule, $this->_rules)) {
return (array) $this->_rules[$rule];
}
throw new Exception('Undefined rule: "' . $rule . '"');
}
/** * @param string $rule * @return array * @throws \JBZoo\SimpleTypes\Exception */ public function getRuleData($rule) { $rule = $this->_parser->cleanRule($rule); return $this->_formatter->get($rule); }