/** * @param string|array $expression * @param null|\DOMNode|\DOMDocument|Document|Html|Table|Form|Attr|Element|Tag|Field|Text|Cdata|Comment $contextnode * @param bool $registerNodeNS * * @return Set */ public function query($expression, \DOMNode $contextnode = null, $registerNodeNS = true) { $prepared = $this->expression($expression); $result = @parent::query($prepared, $contextnode, $registerNodeNS); $this->doc->debug(array('result', $expression, $prepared, $result)); return $this->doc->set($result); }
/** * @param string $version * @param string $encoding */ public function __construct($version = self::VERSION, $encoding = self::ENCODING) { parent::__construct($version, $encoding); $this->root('table'); $this->head = $this->root()->append('thead')->text(false); $this->body = $this->root()->append('tbody')->text(false); }
/** * @param $wrapper * * @return Element|Tag|Field */ public function wrap($wrapper) { $parent = $this->parentNode; $wrapper = $parent->appendChild($this->ownerDocument->check($wrapper)); $wrapper->appendChild($this->cloneNode(true)); $parent->replaceChild($wrapper, $this); return $wrapper; }
/** * @param string $version * @param string $encoding */ public function __construct($version = self::VERSION, $encoding = self::ENCODING) { parent::__construct($version, $encoding); $this->root('html'); $this->head = $this->root()->append('head')->text(false); $this->body = $this->root()->append('body')->text(false); $this->container = new Document(); $this->container->root('keep'); $this->scripts = $this->container->root()->append('scripts'); $this->ajax = $this->container->root()->append(self::AJAX_ROOT); }
/** * @param string $version * @param string $encoding */ public function __construct($version = self::VERSION, $encoding = self::ENCODING) { $data = ''; if (is_file($version)) { $this->path = $version; } else { if ($version !== self::VERSION) { $data = $version; $version = self::VERSION; } } parent::__construct($version, $encoding); $this->source = $this->root('file')->attr('path', $this->path)->append($this->createCData($data)); }
/** * @param string $source * @param int|null $options * @param bool $result * * @return $this|Document|Xslt */ public function loadXML($source, $options = LIBXML_NOCDATA, &$result = false) { parent::loadXML($source, $options, $result); $this->processor(); return $this; }
/** * @param string $version * @param string $encoding */ public function __construct($version = self::VERSION, $encoding = self::ENCODING) { parent::__construct($version, $encoding); $this->root('form')->text(''); $this->to(true); }
/** * @param $element * * @return Element|Field|Tag */ public function before($element) { return $this->parent()->insertBefore($this->ownerDocument->importNode($this->ownerDocument->check($element)), $this); }
/** * @return string */ public function __toString() { return $this->ownerDocument->saveXML($this); }
/** * @todo make faster!!! * @param string $xslFile * @param array $xsltParameters * * @return $this|Set */ public function xslt($xslFile, $xsltParameters = array()) { return $this->ownerDocument->xslt($xslFile, $xsltParameters, $this); }