public function add($name, Rule $rule)
    {
        unset($this->rules[$name]);

        $this->rules[$name] = $rule;
    }
public function add($name, Rule $rule)
    {
        unset($this->rules[$name]);

        $this->rules[$name] = $rule;
    }
public function add ( $ name , Rule $ rule ) { unset ( $ this -> rules [ $ name ] ) ; $ this -> rules [ $ name ] = $ rule ; }
Adds a rule.

@param string $name The rule name
@param Rule   $rule A Rule instance
Adds a rule .