FluentDOM\Loader\PHP\SimpleXml::load PHP Метод

load() публичный Метод

См. также: Loadable::load
public load ( SimpleXMLElement $source, string $contentType, array | Traversable | Options $options = [] ) : Document | Result | null
$source SimpleXMLElement
$contentType string
$options array | Traversable | Options
Результат FluentDOM\Document | FluentDOM\Loader\Result | null
    public function load($source, $contentType, $options = [])
    {
        if ($source instanceof \SimpleXMLElement) {
            $document = new Document();
            $document->appendChild($document->importNode(dom_import_simplexml($source), TRUE));
            return new Result($document, 'text/xml');
        }
        return NULL;
    }