| Total Complexity | 3 |
| Total Lines | 44 |
| Duplicated Lines | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 18 | final class Artifact extends AbstractSamlpElement |
||
| 19 | { |
||
| 20 | use Base64ElementTrait; |
||
|
|
|||
| 21 | |||
| 22 | /** |
||
| 23 | * Initialize an artifact. |
||
| 24 | * |
||
| 25 | * @param string $content |
||
| 26 | */ |
||
| 27 | public function __construct( |
||
| 28 | string $content, |
||
| 29 | ) { |
||
| 30 | $this->setContent($content); |
||
| 31 | } |
||
| 32 | |||
| 33 | |||
| 34 | /** |
||
| 35 | * Validate the content of the element. |
||
| 36 | * |
||
| 37 | * @param string $content The value to go in the XML textContent |
||
| 38 | * @throws \Exception on failure |
||
| 39 | * @return void |
||
| 40 | */ |
||
| 41 | protected function validateContent(string $content): void |
||
| 44 | } |
||
| 45 | |||
| 46 | |||
| 47 | /** |
||
| 48 | * Convert XML into an Artifact |
||
| 49 | * |
||
| 50 | * @param \DOMElement $xml The XML element we should load |
||
| 51 | * @return static |
||
| 52 | * |
||
| 53 | * @throws \SimpleSAML\XML\Exception\InvalidDOMElementException |
||
| 54 | * If the qualified name of the supplied element is wrong |
||
| 55 | */ |
||
| 56 | public static function fromXML(DOMElement $xml): static |
||
| 62 | } |
||
| 63 | } |
||
| 64 |