function renderViewFile($_viewFile_, $_data_ = null, $_return_ = false)
    {
        // we use special variable names here to avoid conflict when extracting data
        if (is_array($_data_)) {
            extract($_data_, EXTR_PREFIX_SAME, 'data');
        }

        if ($_return_) {
            ob_start();
            ob_implicit_flush(false);

            require $_viewFile_;

            return ob_get_clean();
        }

        require $_viewFile_;

        return null;
    }
function renderViewFile($_viewFile_, $_data_ = null, $_return_ = false)
    {
        // we use special variable names here to avoid conflict when extracting data
        if (is_array($_data_)) {
            extract($_data_, EXTR_PREFIX_SAME, 'data');
        }

        if ($_return_) {
            ob_start();
            ob_implicit_flush(false);

            require $_viewFile_;

            return ob_get_clean();
        }

        require $_viewFile_;

        return null;
    }
function renderViewFile ( $ _viewFile_ , $ _data_ = null , $ _return_ = false ) { // we use special variable names here to avoid conflict when extracting data if ( is_array ( $ _data_ ) ) { extract ( $ _data_ , EXTR_PREFIX_SAME , 'data' ) ; } if ( $ _return_ ) { ob_start ( ) ; ob_implicit_flush ( false ) ; require $ _viewFile_ ; return ob_get_clean ( ) ; } require $ _viewFile_ ; return null ; }
Renders a view file.
This method includes the view file as a PHP script and captures the display result if required.

@param string  $_viewFile_ The view file.
@param array   $_data_     The data to be extracted and made available to the view file.
@param boolean $_return_   Whether the rendering result should be returned as a string.

@return string|null The rendering result, or `null` if the rendering result is not required
Renders a view file . This method includes the view file as a PHP script and captures the display result if required .