protected function setData($name, $value = null)
    {
        if (is_array($name)) {
            $this->data = array_merge($this->data, $name);
        }
        elseif (is_string($name)) {
            $this->data[$name] = $value;
        }

        return $this;
    }
protected function setData($name, $value = null)
    {
        if (is_array($name)) {
            $this->data = array_merge($this->data, $name);
        }
        elseif (is_string($name)) {
            $this->data[$name] = $value;
        }

        return $this;
    }
protected function setData ( $ name , $ value = null ) { if ( is_array ( $ name ) ) { $ this -> data = array_merge ( $ this -> data , $ name ) ; } elseif ( is_string ( $ name ) ) { $ this -> data [ $ name ] = $ value ; } return $ this ; }
Set view data.

@param  string|array  $name
@param  mixed         $value

@return self
Set view data .