Code Coverage
 
Lines
Functions and Methods
Classes and Traits
Total
n/a
0 / 0
n/a
0 / 0
CRAP
n/a
0 / 0
1<?php
2declare(strict_types=1);
3/**
4 * Pop PHP Framework (https://www.popphp.org/)
5 *
6 * @link       https://github.com/popphp/popphp-framework
7 * @author     Nick Sagona, III <nick@popphp.org>
8 * @copyright  Copyright (c) 2009-2026 Nick Sagona, III
9 * @license    https://www.popphp.org/license     New BSD License
10 */
11
12/**
13 * @namespace
14 */
15namespace Pop;
16
17use ArrayIterator;
18
19/**
20 * Manager interface
21 *
22 * @category   Pop
23 * @package    Pop
24 * @author     Nick Sagona, III <nick@popphp.org>
25 * @copyright  Copyright (c) 2009-2026 Nick Sagona, III
26 * @license    https://www.popphp.org/license     New BSD License
27 * @version    5.0.0
28 */
29interface ManagerInterface
30{
31
32    /**
33     * Set items
34     *
35     * @param  array $items
36     * @return static
37     */
38    public function setItems(array $items): static;
39
40    /**
41     * Add items
42     *
43     * @param  array $items
44     * @return static
45     */
46    public function addItems(array $items): static;
47
48    /**
49     * Add an item
50     *
51     * @param  mixed $item
52     * @param  mixed $name
53     * @return static
54     */
55    public function addItem(mixed $item, mixed $name = null): static;
56
57    /**
58     * Remove an item
59     *
60     * @param  mixed $name
61     * @return static
62     */
63    public function removeItem(mixed $name): static;
64
65    /**
66     * Get an item
67     *
68     * @param  mixed $name
69     * @return mixed
70     */
71    public function getItem(mixed $name): mixed;
72
73    /**
74     * Determine whether the manager has an item
75     *
76     * @param  string $name
77     * @return bool
78     */
79    public function hasItem(string $name): bool;
80
81    /**
82     * Set an item
83     *
84     * @param  string $name
85     * @param  mixed  $value
86     * @return void
87     */
88    public function __set(string $name, mixed $value): void;
89
90    /**
91     * Get an item
92     *
93     * @param  string $name
94     * @return mixed
95     */
96    public function __get(string $name): mixed;
97
98    /**
99     * Determine if an item exists
100     *
101     * @param  string $name
102     * @return bool
103     */
104    public function __isset(string $name): bool;
105
106    /**
107     * Unset an item
108     *
109     * @param  string $name
110     * @return void
111     */
112    public function __unset(string $name): void;
113
114    /**
115     * Set an item
116     *
117     * @param  mixed $offset
118     * @param  mixed $value
119     * @return void
120     */
121    public function offsetSet(mixed $offset, mixed $value): void;
122
123    /**
124     * Get an item
125     *
126     * @param  mixed $offset
127     * @return mixed
128     */
129    public function offsetGet(mixed $offset): mixed;
130
131    /**
132     * Determine if an item exists
133     *
134     * @param  string $offset
135     * @return bool
136     */
137    public function offsetExists($offset): bool;
138
139    /**
140     * Unset an item
141     *
142     * @param  mixed $offset
143     * @return void
144     */
145    public function offsetUnset(mixed $offset): void;
146
147    /**
148     * Return count
149     *
150     * @return int
151     */
152    public function count(): int;
153
154    /**
155     * Get iterator
156     *
157     * @return ArrayIterator
158     */
159    public function getIterator(): ArrayIterator;
160
161}