src/Traits/ViewVarTrait.php
public function viewVar($name = null)
    {
        if (empty($name)) {
            return $this->getConfig('viewVar') ?: $this->_deriveViewVar();
        }

        return $this->setConfig('viewVar', $name);
    }
public function viewVar($name = null)
    {
        if (empty($name)) {
            return $this->getConfig('viewVar') ?: $this->_deriveViewVar();
        }

        return $this->setConfig('viewVar', $name);
    }
public function viewVar ( $ name = null ) { if ( empty ( $ name ) ) { return $ this -> getConfig ( 'viewVar' ) ? : $ this -> _deriveViewVar ( ) ; } return $ this -> setConfig ( 'viewVar' , $ name ) ; }
Change the name of the view variable name
of the data when its sent to the view

@param mixed $name Var name
@return mixed
@throws \Exception
Change the name of the view variable name of the data when its sent to the view