You are here

public function DriverBase::xmlData in Forena Reports 8

Implement static XML functioin

Parameters

string $xmlData : XML Source data from block load

Return value

SimpleXMLElement XML node

1 call to DriverBase::xmlData()
DriverBase::data in src/FrxPlugin/Driver/DriverBase.php
Return data based on block definition.

File

src/FrxPlugin/Driver/DriverBase.php, line 413
Class that defines default methods for access control in an DriverBase

Class

DriverBase

Namespace

Drupal\forena\FrxPlugin\Driver

Code

public function xmlData($xmlData) {
  $xml = '';
  if (trim($xmlData)) {
    try {
      $xml = new SimpleXMLElement($xmlData);
    } catch (\Exception $e) {
      $this
        ->app()
        ->error("Error processing xml\n", $e
        ->getMessage() . "\n" . $xmlData);
    }
  }
  return $xml;
}