Lines Matching defs:controls
23 * Represents a set of controls.
32 protected $controls;
36 * @param Control ...$controls
38 public function __construct(Control ...$controls)
40 $this->controls = $controls;
52 foreach ($this->controls as $ctrl) {
61 return array_search($control, $this->controls, true) !== false;
72 foreach ($this->controls as $control) {
82 * Add more controls.
84 * @param Control ...$controls
87 public function add(Control ...$controls)
89 foreach ($controls as $control) {
90 $this->controls[] = $control;
97 * Set the controls.
99 * @param Control ...$controls
102 public function set(Control ...$controls)
104 $this->controls = $controls;
110 * Remove controls by OID or Control object (strict check).
112 * @param Control|string ...$controls
115 public function remove(...$controls)
118 foreach ($controls as $control) {
120 foreach ($this->controls as $i => $ctrl) {
122 unset($this->controls[$i]);
126 if (($i = array_search($control, $this->controls, true)) !== false) {
127 unset($this->controls[$i]);
136 * Remove all of the controls.
142 $this->controls = [];
154 return $this->controls;
162 return count($this->controls);
171 return new ArrayIterator($this->controls);