19 declare(strict_types=1);
33 class ilHandler extends ilFileHandler implements ilXMLFileHandlerInterface
35 protected ilImportStatusFactoryInterface
$status;
39 ilImportStatusFactoryInterface $status
48 $clone->xml_file_info = $file_info;
55 $clone->namespaces = $clone->namespaces->withElement($namespace_handler);
64 $old_val = libxml_use_internal_errors(
true);
67 $status_collection = $this->status->collection();
68 $errors = libxml_get_errors();
69 libxml_clear_errors();
70 foreach ($errors as
$error) {
71 $status_collection = $status_collection->withAddedStatus(
73 $this->status->content()->builder()->string()->withString(
74 "Error loading dom document:" .
76 "<br>ERROR: " . $error->message
82 $exception = $this->status->exception($status_collection->toString(
StatusType::FAILED));
83 $exception->setStatuses($status_collection);
86 libxml_use_internal_errors($old_val);
getSubPathToDirBeginningAtPathEnd(string $dir_name)
ilFileNamespaceFactoryInterface $namespace
__construct(ilFileNamespaceFactoryInterface $namespace, ilImportStatusFactoryInterface $status)
ilImportStatusFactoryInterface $status
withFileInfo(SplFileInfo $file_info)
withAdditionalNamespace(ilFileNamespaceHandlerInterface $namespace_handler)