You are here

public static function Frx::tempDOM in Forena Reports 7.5

Same name and namespace in other branches
  1. 7.4 Frx.inc \Frx::tempDOM()

Temporary dom object used for for fragment importing and manipulation. We use a singleton here to reduce the memory footprint.

Return value

DOMDocument

2 calls to Frx::tempDOM()
RendererBase::addFragment in src/Renderer/RendererBase.php
Append a textual XHTML fragment to the dom. We do not use the DOMDocumentFragment optioin because they don't properly import namespaces. .
RendererBase::validateTextFormats in src/Renderer/RendererBase.php
Helper funciton for validating text_format type controls.

File

./Frx.inc, line 36
Frx.incL General Forena Reporting Class

Class

Frx

Code

public static function tempDOM() {
  static $o = '';
  if (!$o) {
    $o = new DOMDocument('1.0', 'UTF-8');
    @$o
      ->load('<?xml version="1.0" encoding="UTF-8"?>
         <!DOCTYPE root [
         <!ENTITY nbsp "&#160;">
         ]>');
  }
  return $o;
}