src/Traits/ViewTrait.php
public function view($view = null)
    {
        if (empty($view)) {
            return $this->getConfig('view') ?: $this->_request()->getParam('action');
        }

        return $this->setConfig('view', $view);
    }
public function view($view = null)
    {
        if (empty($view)) {
            return $this->getConfig('view') ?: $this->_request()->getParam('action');
        }

        return $this->setConfig('view', $view);
    }
public function view ( $ view = null ) { if ( empty ( $ view ) ) { return $ this -> getConfig ( 'view' ) ? : $ this -> _request ( ) -> getParam ( 'action' ) ; } return $ this -> setConfig ( 'view' , $ view ) ; }
Change the view to be rendered

If `$view` is NULL the current view is returned
else the `$view` is changed

If no view is configured, it will use the action
name from the request object

@param mixed $view View name
@return mixed
Change the view to be rendered