ILIAS  release_8 Revision v8.24
class.ilPDFGenerationDefinitionProcessor.php
Go to the documentation of this file.
1<?php
2
19declare(strict_types=1);
20
25{
26 protected ilDBInterface $db;
27 protected ?string $component = null;
28
29 public function __construct(ilDBInterface $db)
30 {
31 $this->db = $db;
32 }
33
34 public function purge(): void
35 {
36 }
37
38 public function beginComponent(string $component, string $type): void
39 {
40 $this->component = $type . "/" . $component;
41 }
42
43 public function endComponent(string $component, string $type): void
44 {
45 $this->component = null;
46 }
47
48 public function beginTag(string $name, array $attributes): void
49 {
50 if ($name !== "pdfpurpose") {
51 return;
52 }
53
54 ilPDFCompInstaller::updateFromXML($this->component, $attributes['name'], $attributes['preferred']);
55 }
56
57 public function endTag(string $name): void
58 {
59 }
60}
static updateFromXML(string $service, string $purpose, string $preferred)
beginComponent(string $component, string $type)
This method is called when parsing of component.xml for the given component starts.
beginTag(string $name, array $attributes)
This is called when a tag starts in the context of the given component.
purge()
This methods is supposed to purge existing data in the provider of the component, so new components c...
endComponent(string $component, string $type)
This method is called when parsing of component.xml for the given component ends.
endTag(string $name)
This is called when a tag ends in the context of the given component.
An ilComponentDefinitionProcessor processes some attributes from a component.xml (i....
Interface ilDBInterface.
if($format !==null) $name
Definition: metadata.php:247
$attributes
Definition: metadata.php:248
$type