3 namespace Drupal\drupalmoduleupgrader;
5 use Pharborist\NodeInterface;
8 * Interface for plugins which can scan a target module to collect information
9 * about what it contains. Indexers are always run before other plugin types,
10 * and all available indexers are always run. All information collected by
11 * indexers is available to the other plugin types via TargetInterface's
12 * getIndexer() method.
14 interface IndexerInterface {
16 public function bind(TargetInterface $module);
18 public function build();
20 public function clear();
22 public function destroy();
24 public function has($identifier);
26 public function hasAny(array $identifiers);
28 public function hasAll(array $identifiers);
30 public function addFile($path);
32 public function add(NodeInterface $node);
34 public function deleteFile($path);
36 public function delete($identifier);
38 public function get($identifier);
40 public function getMultiple(array $identifiers);
42 public function getAll();
44 public function getFields();
46 public function getQuery(array $fields = []);