protected function setValidationVariables(array $data, $nestedKey = null)
    {
        foreach ($data as $key => $value) {
            // Add support for nested arrays
            $key = ! empty($nestedKey) ? $nestedKey.'.'.$key : $key;

            // If value is an array, we need to created a nested key
            // until we reach the final value.
            if (is_array($value)) {
                $this->setValidationVariables($value, $key);
            } else {
                $this->variables['{:'.$key.'}'] = $value;
            }
        }

        return $this;
    }
protected function setValidationVariables(array $data, $nestedKey = null)
    {
        foreach ($data as $key => $value) {
            // Add support for nested arrays
            $key = ! empty($nestedKey) ? $nestedKey.'.'.$key : $key;

            // If value is an array, we need to created a nested key
            // until we reach the final value.
            if (is_array($value)) {
                $this->setValidationVariables($value, $key);
            } else {
                $this->variables['{:'.$key.'}'] = $value;
            }
        }

        return $this;
    }
protected function setValidationVariables ( array $ data , $ nestedKey = null ) { foreach ( $ data as $ key => $ value ) { // Add support for nested arrays $ key = ! empty ( $ nestedKey ) ? $ nestedKey . '.' . $ key : $ key ; // If value is an array, we need to created a nested key // until we reach the final value. if ( is_array ( $ value ) ) { $ this -> setValidationVariables ( $ value , $ key ) ; } else { $ this -> variables [ '{:' . $ key . '}' ] = $ value ; } } return $ this ; }
Set validation variables.

@author Morten Rugaard <moru@nodes.dk>

@param  array  $data
@param  string $nestedKey
@return \Nodes\Validation\AbstractValidator
Set validation variables .