ILIAS  trunk Revision v11.0_alpha-2662-g519ff7d528f
ILIAS\COPage\Xsl\XslManager Class Reference
+ Collaboration diagram for ILIAS\COPage\Xsl\XslManager:

Public Member Functions

 __construct ()
 
 process (string $xml, array $params)
 

Detailed Description

Author
Alexander Killing killi.nosp@m.ng@l.nosp@m.eifos.nosp@m..de

Definition at line 26 of file XslManager.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\COPage\Xsl\XslManager::__construct ( )

Definition at line 28 of file XslManager.php.

29  {
30  }

Member Function Documentation

◆ process()

ILIAS\COPage\Xsl\XslManager::process ( string  $xml,
array  $params 
)

Definition at line 32 of file XslManager.php.

35  : string {
36  $xslt = new \XSLTProcessor();
37  $xsl = file_get_contents(ILIAS_ABSOLUTE_PATH . "/components/ILIAS/COPage/xsl/page.xsl");
38  $xslt_domdoc = new \DomDocument();
39  $xslt_domdoc->loadXML($xsl);
40  $xslt->importStylesheet($xslt_domdoc);
41  foreach ($params as $key => $value) {
42  $xslt->setParameter("", $key, (string) $value);
43  }
44  $xml_domdoc = new \DomDocument();
45  $xml_domdoc->loadXML($xml);
46  // show warnings again due to discussion in #12866
47  $result = $xslt->transformToXml($xml_domdoc);
48  unset($xslt);
49  return (string) $result;
50  }
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:31

The documentation for this class was generated from the following file: