public function add($type, Rule $rule)
    {
        if (!isset($this[$type])) {
            $this[$type] = [];
        }

        if ($rule->language === false) {
            $rule->language = $this->_language;
        }

        if ($rule->validator === false) {
            $rule->validator = $this->validator;
        }

        $rule->factory->setBase($type);

        if ($rule->name !== null) {
            if (isset($this[$type][$rule->name])) {
                throw new NameConflictException("Rule with '{$rule->name}' is already defined, name has to be unique!");
            }

            $this[$type][$rule->name] = $rule;
            return;
        }

        $this[$type][] = $rule;
    }