public function wrap($wrapper) { foreach ($this->stack() as $node) { phpQuery::pq($node, $this->getDocumentID())->wrapAll($wrapper); } return $this; }