PluginProbe ʕ •ᴥ•ʔ
Admin Columns / 7.1.4
Admin Columns v7.1.4
7.1.4 7.0.19 2.3.5 2.4 2.4.1 2.4.10 2.4.2 2.4.3 2.4.4 2.4.5 2.4.6 2.4.7 2.4.8 2.4.9 2.5.2 2.5.3 2.5.4 2.5.5 2.5.6 2.5.6.1 2.5.6.2 2.5.6.3 2.5.6.4 3.0 3.0.1 3.0.2 3.0.3 3.0.5 3.0.7 3.1 3.1.1 3.1.10 3.1.2 3.1.3 3.1.5 3.2.3 3.2.7 3.3.1 3.4.1 3.4.6 3.4.8 4.0.1 4.0.3 4.1.6 4.2.2 4.2.5 4.3 4.3.2 4.4.1 4.4.4 4.4.5 4.5.5 4.6.1 4.7.18 4.7.19 4.7.20 4.7.7 7.0.13 7.0.14 7.0.16 trunk 1.0 1.1 1.1.3 1.2 1.2.1 1.3 1.3.1 1.4 1.4.1 1.4.2 1.4.3 1.4.4 1.4.5 1.4.5.1 1.4.6 1.4.6.1 1.4.6.2 1.4.6.3 1.4.6.4 1.4.7 1.4.8 1.4.9 2.0.0 2.0.1 2.0.2 2.0.3 2.1.0 2.1.1 2.1.2 2.1.3 2.1.4 2.1.5 2.2 2.2.1 2.2.1.1 2.2.2 2.2.3 2.2.4 2.2.5 2.2.5.1 2.2.6 2.2.6.1 2.2.6.2 2.2.6.3 2.2.6.4 2.2.7 2.2.8 2.2.8.1 2.2.9 2.3.1 2.3.2 2.3.3
codepress-admin-columns / classes / ListScreenCollection.php
codepress-admin-columns / classes Last commit date
Acf 1 day ago Admin 1 day ago Ajax 1 day ago ApplyFilter 1 day ago Asset 1 day ago Capabilities 1 day ago Check 1 day ago Collection 1 day ago Column 1 day ago ColumnFactories 1 day ago ColumnFactory 1 day ago ColumnIterator 1 day ago ColumnRepository 1 day ago ColumnSize 1 day ago DI 1 day ago DefaultColumnHandler 1 day ago Deprecated 1 day ago Entity 1 day ago Exception 1 day ago Expression 1 day ago Form 1 day ago Formatter 1 day ago Helper 1 day ago Integration 1 day ago ListScreenRepository 1 day ago ListTable 1 day ago Message 1 day ago Meta 1 day ago Nonce 1 day ago Notice 1 day ago Plugin 1 day ago Preferences 1 day ago Promo 1 day ago Request 1 day ago RequestHandler 1 day ago Response 1 day ago Sanitize 1 day ago Service 1 day ago Setting 1 day ago Settings 1 day ago Storage 1 day ago Table 1 day ago TableIdsFactory 1 day ago TableScreen 1 day ago TableScreenFactory 1 day ago ThirdParty 1 day ago Type 1 day ago Value 1 day ago View 1 day ago Acf.php 1 day ago AdminColumns.php 1 day ago ArrayIterator.php 1 day ago Capabilities.php 1 day ago Collection.php 1 day ago CollectionFormatter.php 1 day ago Column.php 1 day ago ColumnCollection.php 1 day ago ColumnFactoryCollectionFactory.php 1 day ago ColumnFactoryDefinitionCollection.php 1 day ago ColumnGroups.php 1 day ago ColumnIterator.php 1 day ago ColumnNamesTrait.php 1 day ago ColumnRepository.php 1 day ago ColumnTypeRepository.php 1 day ago Config.php 1 day ago DateFormats.php 1 day ago DefaultColumnHandler.php 1 day ago Expirable.php 1 day ago Formatter.php 1 day ago FormatterCollection.php 1 day ago Helper.php 1 day ago ListScreen.php 1 day ago ListScreenCollection.php 1 day ago ListScreenRepository.php 1 day ago ListScreenRepositoryWritable.php 1 day ago ListTable.php 1 day ago ListTableFactory.php 1 day ago Loader.php 1 day ago Message.php 1 day ago MetaType.php 1 day ago Middleware.php 1 day ago OpCacheInvalidateTrait.php 1 day ago PluginActionLinks.php 1 day ago PluginActionUpgrade.php 1 day ago PostType.php 1 day ago PostTypeRepository.php 1 day ago Registerable.php 1 day ago Registry.php 1 day ago Renderable.php 1 day ago Request.php 1 day ago RequestAjaxHandler.php 1 day ago RequestAjaxHandlers.php 1 day ago RequestAjaxParser.php 1 day ago RequestHandler.php 1 day ago RequestHandlerFactory.php 1 day ago Screen.php 1 day ago Services.php 1 day ago TableIdsFactory.php 1 day ago TableScreen.php 1 day ago TableScreenFactory.php 1 day ago Taxonomy.php 1 day ago Transient.php 1 day ago TypedArrayIterator.php 1 day ago View.php 1 day ago WooCommerce.php 1 day ago WpListTableFactory.php 1 day ago
ListScreenCollection.php
97 lines
1 <?php
2
3 declare(strict_types=1);
4
5 namespace AC;
6
7 use AC\Exception\IteratorException;
8 use Countable;
9 use Iterator;
10
11 final class ListScreenCollection implements Iterator, Countable
12 {
13 /**
14 * @var ListScreen[]
15 */
16 private array $data = [];
17
18 public function __construct(array $list_screens = [])
19 {
20 array_map([$this, 'add'], $list_screens);
21 }
22
23 public function add(ListScreen $list_screen): void
24 {
25 $this->data[(string)$list_screen->get_id()] = $list_screen;
26 }
27
28 public function remove(ListScreen $list_screen): void
29 {
30 unset($this->data[(string)$list_screen->get_id()]);
31 }
32
33 public function contains(ListScreen $list_screen): bool
34 {
35 return isset($this->data[(string)$list_screen->get_id()]);
36 }
37
38 public function rewind(): void
39 {
40 reset($this->data);
41 }
42
43 public function current(): ListScreen
44 {
45 $current = current($this->data);
46
47 if (! $current instanceof ListScreen) {
48 throw IteratorException::from_current();
49 }
50
51 return $current;
52 }
53
54 public function first(): ?ListScreen
55 {
56 return $this->count()
57 ? $this->data[array_key_first($this->data)]
58 : null;
59 }
60
61 public function key(): string
62 {
63 $key = key($this->data);
64
65 if (! is_string($key)) {
66 throw IteratorException::from_key();
67 }
68
69 return $key;
70 }
71
72 public function next(): void
73 {
74 next($this->data);
75 }
76
77 public function valid(): bool
78 {
79 return key($this->data) !== null;
80 }
81
82 public function count(): int
83 {
84 return count($this->data);
85 }
86
87 public function get_copy(): array
88 {
89 $copy = $this->data;
90
91 reset($copy);
92
93 return $copy;
94 }
95
96 }
97