ILIAS  release_8 Revision v8.19-1-g4e8f2f9140c
All Data Structures Namespaces Files Functions Variables Modules Pages
ilSamlIdpXmlMetadataErrorFormatter Class Reference
+ Collaboration diagram for ilSamlIdpXmlMetadataErrorFormatter:

Public Member Functions

 formatErrors (LibXMLError ... $errors)
 Format a list of errors as a string. More...
 

Private Member Functions

 formatError (LibXMLError $error)
 Format an error as a string. More...
 

Detailed Description

Definition at line 21 of file class.ilSamlIdpXmlMetadataErrorFormatter.php.

Member Function Documentation

◆ formatError()

ilSamlIdpXmlMetadataErrorFormatter::formatError ( LibXMLError  $error)
private

Format an error as a string.

This function formats the given LibXMLError object as a string.

Parameters
LibXMLError$errorThe LibXMLError which should be formatted.
Returns
string A string representing the given LibXMLError.

Definition at line 29 of file class.ilSamlIdpXmlMetadataErrorFormatter.php.

Referenced by formatErrors().

29  : string
30  {
31  return implode(',', [
32  'level=' . $error->level,
33  'code=' . $error->code,
34  'line=' . $error->line,
35  'col=' . $error->column,
36  'msg=' . trim($error->message)
37  ]);
38  }
+ Here is the caller graph for this function:

◆ formatErrors()

ilSamlIdpXmlMetadataErrorFormatter::formatErrors ( LibXMLError ...  $errors)

Format a list of errors as a string.

This function takes an argument list of LibXMLError objects and creates a string with all the errors. Each error will be separated by a newline, and the string will end with a newline-character.

Parameters
LibXMLError...$errors A list of error arguments.
Returns
string A string representing the errors. An empty string will be returned if there were no errors in the argument list.

Definition at line 49 of file class.ilSamlIdpXmlMetadataErrorFormatter.php.

References formatError().

49  : string
50  {
51  $text = '';
52  foreach ($errors as $error) {
53  $text .= $this->formatError($error) . "\n";
54  }
55 
56  return $text;
57  }
$errors
Definition: imgupload.php:65
formatError(LibXMLError $error)
Format an error as a string.
+ Here is the call graph for this function:

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