3 namespace Drupal\drupalmoduleupgrader;
5 abstract class ArrayIndexer extends IndexerBase {
7 protected $elements = [];
12 final public function hasAny(array $keys) {
13 foreach ($keys as $key) {
14 if ($this->count($key)) {
24 final public function hasAll(array $keys) {
25 foreach ($keys as $key) {
26 if ($this->count($key) == 0) {
36 final public function get($key) {
37 return $this->elements[$key];
43 final public function getMultiple(array $keys) {
46 foreach ($keys as $key) {
47 if (array_key_exists($key, $this->elements)) {
48 $values[$key] = $this->get($key);
58 final public function getAll() {
59 return $this->elements;