ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
Writer.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
22
25
26class Writer implements WriterInterface
27{
28 protected LOMRepository $lom_repository;
29 protected SimpleDCXMLWriter $xml_writer;
30
31 public function __construct(
32 LOMRepository $lom_repository,
33 SimpleDCXMLWriter $xml_writer
34 ) {
35 $this->lom_repository = $lom_repository;
36 $this->xml_writer = $xml_writer;
37 }
38
39 public function writeSimpleDCMetaData(int $obj_id, int $ref_id, string $type): \DOMDocument
40 {
41 $simple_dc_xml = new \DOMDocument();
42 $simple_dc_xml->loadXML($this->xml_writer->write(
43 $this->lom_repository->getMD($obj_id, $obj_id, $type),
45 )->asXML());
46 return $simple_dc_xml;
47 }
48}
__construct(LOMRepository $lom_repository, SimpleDCXMLWriter $xml_writer)
Definition: Writer.php:31
writeSimpleDCMetaData(int $obj_id, int $ref_id, string $type)
Definition: Writer.php:39
$ref_id
Definition: ltiauth.php:66