Skip to content
Daniele Orlando edited this page Feb 20, 2016 · 10 revisions

APIs

Functions

function fluidxml($root?, array $options?);

function fluidify($file);

function fluidns($id, $uri, $mode?);

FluidXml interfaces

class FluidXml

::load($file);

::new($root?, array $options?);            // Alias of __construct(), requires PHP 7.

__construct($root?, array $options?);

->namespace(...$namespace);

->namespaces();

->__invoke(...$query);                     // Concise syntax.
->query(...$query);                        // Extended syntax.

->add($child, ...$optionals);              // Concise.
->addChild($child, ...$optionals);         // Extended.

->prepend($sibling, ...$optionals);        // Concise.
->prependSibling($sibling, ...$optionals); // Extended.

->append($sibling, ...$optionals);         // Concise.
->appendSibling($sibling, ...$optionals);  // Extended.

->attr(...$arguments);                     // Concise.
->setAttribute(...$arguments);             // Extended.

->text($text);                             // Concise.
->setText($text);                          // Extended.

->addText($text);

->cdata($text);                            // Concise.
->setCdata($text);                         // Extended.

->addCdata($text);

->remove(...$query);

->size();                                  // Concise.
->length();                                // Extended.

->array();

->dom();

->__toString();                            // Concise.
->xml($strip = false);                     // Extended.

->html($strip = false);

->save($file, $strip = false);

FluidNamespace interfaces

class FluidNamespace

__construct($id, $uri, $mode?);

->id();

->uri();

->mode();

->querify($xpath);

The complete API documentation can be generated executing:

./support/tools/gendoc      # Generated under 'documents/api/'.