Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x
  2. SnapshotNodeList.php

class SnapshotNodeList

@no-named-arguments Parameter names are not covered by the backward compatibility promise for PHPUnit

@internal This class is not covered by the backward compatibility promise for PHPUnit

@template-implements IteratorAggregate<int, DOMNode>

Hierarchy

  • class \PHPUnit\TextUI\XmlConfiguration\SnapshotNodeList implements \Countable, \IteratorAggregate

Expanded class hierarchy of SnapshotNodeList

File

vendor/phpunit/phpunit/src/TextUI/Configuration/Xml/Migration/SnapshotNodeList.php, line 26

Namespace

PHPUnit\TextUI\XmlConfiguration
View source
final class SnapshotNodeList implements Countable, IteratorAggregate {
    
    /**
     * @psalm-var list<DOMNode>
     */
    private array $nodes = [];
    public static function fromNodeList(DOMNodeList $list) : self {
        $snapshot = new self();
        foreach ($list as $node) {
            $snapshot->nodes[] = $node;
        }
        return $snapshot;
    }
    public function count() : int {
        return count($this->nodes);
    }
    public function getIterator() : ArrayIterator {
        return new ArrayIterator($this->nodes);
    }

}

Members

Title Sort descending Modifiers Object type Summary
SnapshotNodeList::$nodes private property @psalm-var list&lt;DOMNode&gt;
SnapshotNodeList::count public function
SnapshotNodeList::fromNodeList public static function
SnapshotNodeList::getIterator public function

API Navigation

  • Drupal Core 11.1.x
  • Topics
  • Classes
  • Functions
  • Constants
  • Globals
  • Files
  • Namespaces
  • Deprecated
  • Services
RSS feed
Powered by Drupal