protected function buildRulesArray()
    {
        if (method_exists($this, $this->context)) {
            $rules = $this->{$this->context}();
        } elseif (isset($this->rules[$this->context])) {
            $rules = $this->rules[$this->context];
        } else {
            throw new InvalidArgumentException("Undefined validation context: " . $this->context);
        }
        return $this->bindPlaceholders($rules);
    }
protected function buildRulesArray()
    {
        if (method_exists($this, $this->context)) {
            $rules = $this->{$this->context}();
        } elseif (isset($this->rules[$this->context])) {
            $rules = $this->rules[$this->context];
        } else {
            throw new InvalidArgumentException("Undefined validation context: " . $this->context);
        }
        return $this->bindPlaceholders($rules);
    }
protected function buildRulesArray ( ) { if ( method_exists ( $ this , $ this -> context ) ) { $ rules = $ this -> { $ this -> context } ( ) ; } elseif ( isset ( $ this -> rules [ $ this -> context ] ) ) { $ rules = $ this -> rules [ $ this -> context ] ; } else { throw new InvalidArgumentException ( "Undefined validation context: " . $ this -> context ) ; } return $ this -> bindPlaceholders ( $ rules ) ; }
Build rules array

@throws InvalidArgumentException

@return array
Build rules array