Lines Matching +full:- +full:- +full:group
11 * Copyright © 2007-2017, Hoa community. All rights reserved.
40 * Class \Hoa\Exception\Group.
42 * This is an exception that contains a group of exceptions.
44 * @copyright Copyright © 2007-2017 Hoa community
47 class Group extends Exception implements \ArrayAccess, \IteratorAggregate, \Countable class
73 $this->_group = new \SplStack();
74 $this->beginTransaction();
101 $exception->raise($previous)
111 * @return \Hoa\Exception\Group
115 $this->_group->push(new \ArrayObject());
123 * @return \Hoa\Exception\Group
127 if (1 >= count($this->_group)) {
131 $this->_group->pop();
139 * @return \Hoa\Exception\Group
143 if (false === $this->hasUncommittedExceptions()) {
144 $this->_group->pop();
149 foreach ($this->_group->pop() as $index => $exception) {
164 1 < count($this->_group) &&
165 0 < count($this->_group->top());
169 * Check if an index in the group exists.
176 foreach ($this->_group as $group) {
177 if (isset($group[$index])) {
186 * Get an exception from the group.
193 foreach ($this->_group as $group) {
194 if (isset($group[$index])) {
195 return $group[$index];
203 * Set an exception in the group.
215 $group = $this->_group->top();
219 $group[] = $exception;
221 $group[$index] = $exception;
228 * Remove an exception in the group.
235 foreach ($this->_group as $group) {
236 if (isset($group[$index])) {
237 unset($group[$index]);
245 * Get committed exceptions in the group.
251 return $this->_group->bottom();
261 return $this->getExceptions()->getIterator();
271 return count($this->getExceptions());
281 return count($this->_group);