public function addViewData($key, $value)
    {
        if ($key) {
            $this->modelVar[$key] = $value;
        } else {
            $this->modelVar = $value;
        }

        return $this;
    }
public function addViewData($key, $value)
    {
        if ($key) {
            $this->modelVar[$key] = $value;
        } else {
            $this->modelVar = $value;
        }

        return $this;
    }
public function addViewData ( $ key , $ value ) { if ( $ key ) { $ this -> modelVar [ $ key ] = $ value ; } else { $ this -> modelVar = $ value ; } return $ this ; }
to add view data

@param $key
@param $value
@return $this
to add view data