sibling example

/** * Returns the siblings nodes of the current selection. * * @throws \InvalidArgumentException When current node is empty */
    public function siblings()static
    {
        if (!$this->nodes) {
            throw new \InvalidArgumentException('The current node list is empty.');
        }

        return $this->createSubCrawler($this->sibling($this->getNode(0)->parentNode->firstChild));
    }

    public function matches(string $selector): bool
    {
        if (!$this->nodes) {
            return false;
        }

        $converter = $this->createCssSelectorConverter();
        $xpath = $converter->toXPath($selector, 'self::');

        
Home | Imprint | This part of the site doesn't use cookies.