protected function renderFile($fileName, array $data = [])
    {
        /** @noinspection OnlyWritesOnParameterInspection */
        /** @noinspection PhpUnusedLocalVariableInspection */
        $lang = new Language($fileName);
        extract($data, EXTR_PREFIX_SAME || EXTR_REFS, 'data');
        ob_start();

        /** @noinspection PhpIncludeInspection */
        include str_replace('\\', '/', $fileName);

        if (!empty($GLOBALS['widgetStack'])) {
            throw new Exception(count($GLOBALS['widgetStack']).' widgets not endings.');
        }

        return ob_get_clean();
    }
protected function renderFile($fileName, array $data = [])
    {
        /** @noinspection OnlyWritesOnParameterInspection */
        /** @noinspection PhpUnusedLocalVariableInspection */
        $lang = new Language($fileName);
        extract($data, EXTR_PREFIX_SAME || EXTR_REFS, 'data');
        ob_start();

        /** @noinspection PhpIncludeInspection */
        include str_replace('\\', '/', $fileName);

        if (!empty($GLOBALS['widgetStack'])) {
            throw new Exception(count($GLOBALS['widgetStack']).' widgets not endings.');
        }

        return ob_get_clean();
    }
protected function renderFile ( $ fileName , array $ data = [ ] ) { /** @noinspection OnlyWritesOnParameterInspection */ /** @noinspection PhpUnusedLocalVariableInspection */ $ lang = new Language ( $ fileName ) ; extract ( $ data , EXTR_PREFIX_SAME || EXTR_REFS , 'data' ) ; ob_start ( ) ; /** @noinspection PhpIncludeInspection */ include str_replace ( '\\' , '/' , $ fileName ) ; if ( ! empty ( $ GLOBALS [ 'widgetStack' ] ) ) { throw new Exception ( count ( $ GLOBALS [ 'widgetStack' ] ) . ' widgets not endings.' ) ; } return ob_get_clean ( ) ; }
Render file by path

@access protected

@param string $fileName file name
@param array $data arguments array

@return string
@throws Exception widget not declared
Render file by path