芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/qrafiqxcreativeagency.com/accounts/office/vendor/veewee/xml/src/Xml/Dom/Document.php
$configurators * * @throws RuntimeException */ public static function configure(callable ... $configurators): self { $document = configure(...$configurators)(new DOMDocument()); return new self($document); } /** * @param list
$configurators * * @throws RuntimeException */ public static function fromXmlFile(string $file, callable ...$configurators): self { return self::configure( loader(xml_file_loader($file)), ...$configurators ); } /** * @param non-empty-string $xml * @param list
$configurators * * @throws RuntimeException */ public static function fromXmlString(string $xml, callable ...$configurators): self { return self::configure( loader(xml_string_loader($xml)), ...$configurators ); } /** * @param list
$configurators * * @throws RuntimeException */ public static function fromXmlNode(DOMNode $node, callable ...$configurators): self { return self::configure( loader(xml_node_loader($node)), ...$configurators ); } /** * @param list
$configurators * * @throws RuntimeException */ public static function fromUnsafeDocument(DOMDocument $document, callable ...$configurators): self { return new self( configure(...$configurators)($document) ); } public function toUnsafeDocument(): DOMDocument { return $this->document; } /** * @template T * @param callable(DOMDocument): T $locator * * @return T */ public function locate(callable $locator) { return $locator($this->document); } /** * @param callable(DOMDocument): mixed $manipulator * * @return $this */ public function manipulate(callable $manipulator): self { $manipulator($this->document); return $this; } /** * @param list
|DOMNode)> $builders * * @return list
*/ public function build(callable ... $builders): array { return Builder\nodes(...map( $builders, fn (callable $builder): Closure => $builder(...) ))($this->document); } /** * @param callable(DOMDocument): IssueCollection $validator */ public function validate(callable $validator): IssueCollection { return $validator($this->document); } /** * @param list
$configurators */ public function xpath(callable ...$configurators): Xpath { return Xpath::fromDocument($this, ...$configurators); } /** * @template T * @param callable(DOMDocument): T $mapper * * @return T */ public function map(callable $mapper) { return $mapper($this->document); } /** * @param list
$configurators * * @throws RuntimeException */ public function reconfigure(callable ... $configurators): self { return self::fromUnsafeDocument($this->document, ...$configurators); } /** * @no-named-arguments */ public function traverse(Visitor ... $visitors): DOMNode { $traverser = new Traverser(...$visitors); return $traverser->traverse($this->map(document_element())); } /** * @return non-empty-string */ public function toXmlString(): string { return $this->map(xml_string()); } }