60 if (!is_null($pSource)) {
74 if ($pSource == null) {
76 }
else if (!is_array($pSource)) {
77 throw new Exception(
'Invalid array parameter passed.');
80 foreach ($pSource as $item) {
92 $hash = $pSource->getHashCode();
93 if (!isset($this->_items[$hash])) {
94 $this->_items[$hash] = $pSource;
95 $this->_keyMap[
count($this->_items) - 1] = $hash;
106 $hash = $pSource->getHashCode();
107 if (isset($this->_items[$hash])) {
108 unset($this->_items[$hash]);
111 foreach ($this->_keyMap as $key => $value) {
112 if ($deleteKey >= 0) {
113 $this->_keyMap[$key - 1] = $value;
116 if ($value == $hash) {
120 unset($this->_keyMap[
count($this->_keyMap) - 1]);
129 $this->_items = array();
130 $this->_keyMap = array();
139 return count($this->_items);
149 return array_search($pHashCode, $this->_keyMap);
160 if (isset($this->_keyMap[$pIndex])) {
175 if (isset($this->_items[$pHashCode])) {
176 return $this->_items[$pHashCode];
195 $vars = get_object_vars($this);
196 foreach ($vars as $key => $value) {
197 if (is_object($value)) {
198 $this->$key = clone $value;