original_string: public function makeFileContents($filePath, $extraParams = [])
      {
          if (!strlen($filePath) ||
              !File::isFile($filePath) ||
              (!File::isLocalPath($filePath) && Config::get('cms.restrictBaseDir', true))
          ) {
              return '';
          }
  
          if (!is_array($extraParams)) {
              $extraParams = [];
          }
  
          $vars = array_merge($this->vars, $extraParams);
  
          $obLevel = ob_get_level();
  
          ob_start();
  
          extract($vars);
  
          // We'll evaluate the contents of the view inside a try/catch block so we can
          // flush out any stray output that might get out before an error occurs or
          // an exception is thrown. This prevents any partial views from leaking.
          try {
              include $filePath;
          }
          catch (Exception $e) {
              $this->handleViewException($e, $obLevel);
          }
          catch (Throwable $e) {
              $this->handleViewException(new FatalThrowableError($e), $obLevel);
          }
  
          return ob_get_clean();
      }
code: public function makeFileContents($filePath, $extraParams = [])
      {
          if (!strlen($filePath) ||
              !File::isFile($filePath) ||
              (!File::isLocalPath($filePath) && Config::get('cms.restrictBaseDir', true))
          ) {
              return '';
          }
  
          if (!is_array($extraParams)) {
              $extraParams = [];
          }
  
          $vars = array_merge($this->vars, $extraParams);
  
          $obLevel = ob_get_level();
  
          ob_start();
  
          extract($vars);
  
          // We'll evaluate the contents of the view inside a try/catch block so we can
          // flush out any stray output that might get out before an error occurs or
          // an exception is thrown. This prevents any partial views from leaking.
          try {
              include $filePath;
          }
          catch (Exception $e) {
              $this->handleViewException($e, $obLevel);
          }
          catch (Throwable $e) {
              $this->handleViewException(new FatalThrowableError($e), $obLevel);
          }
  
          return ob_get_clean();
      }
code_tokens: public function makeFileContents ( $ filePath , $ extraParams = [ ] ) { if ( ! strlen ( $ filePath ) || ! File :: isFile ( $ filePath ) || ( ! File :: isLocalPath ( $ filePath ) && Config :: get ( 'cms.restrictBaseDir' , true ) ) ) { return '' ; } if ( ! is_array ( $ extraParams ) ) { $ extraParams = [ ] ; } $ vars = array_merge ( $ this -> vars , $ extraParams ) ; $ obLevel = ob_get_level ( ) ; ob_start ( ) ; extract ( $ vars ) ; // We'll evaluate the contents of the view inside a try/catch block so we can // flush out any stray output that might get out before an error occurs or // an exception is thrown. This prevents any partial views from leaking. try { include $ filePath ; } catch ( Exception $ e ) { $ this -> handleViewException ( $ e , $ obLevel ) ; } catch ( Throwable $ e ) { $ this -> handleViewException ( new FatalThrowableError ( $ e ) , $ obLevel ) ; } return ob_get_clean ( ) ; }
docstring: Includes a file path using output buffering.
  Ensures that vars are available.
  @param string $filePath Absolute path to the view file.
  @param array $extraParams Parameters that should be available to the view.
  @return string
docstring_tokens: Includes a file path using output buffering . Ensures that vars are available .