FluidXml\FluidXml::__construct PHP Метод

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

public __construct ( $arguments )
    public function __construct(...$arguments)
    {
        // First, we parse the arguments detecting the options provided.
        // This options are needed to build the DOM, add the stylesheet
        // and to create the document root/structure.
        $options = $this->mergeOptions($arguments);
        // Having the options set, we can build the FluidDocument model
        // which incapsulates the DOM and the corresponding XPath instance.
        $document = new FluidDocument();
        $document->dom = $this->newDom($options);
        $document->xpath = new \DOMXPath($document->dom);
        // After the FluidDocument model creation, we can proceed to build
        // the FluidInsertionHandler which requires the model to perform
        // its logics.
        $handler = new FluidInsertionHandler($document);
        // Ok, it's time to let them beeing visible along the instance.
        $this->document = $document;
        $this->handler = $handler;
        // Now, we can further populate the DOM with any stylesheet or child.
        $this->initStylesheet($options)->initRoot($options);
    }