Skip to content
This repository
Browse code

Switch usage to Hash where possible.

  • Loading branch information...
commit 19e0d8d946eaa544652fd46a04b872c9637c1634 1 parent 29048b3
Mark Story authored March 10, 2012

Showing 43 changed files with 148 additions and 141 deletions. Show diff stats Hide diff stats

  1. 2  lib/Cake/Configure/IniReader.php
  2. 4  lib/Cake/Console/Command/AclShell.php
  3. 2  lib/Cake/Console/Command/ConsoleShell.php
  4. 3  lib/Cake/Console/Command/Task/ExtractTask.php
  5. 1  lib/Cake/Controller/Component/Acl/DbAcl.php
  6. 4  lib/Cake/Controller/Component/Acl/IniAcl.php
  7. 2  lib/Cake/Controller/Component/Acl/PhpAcl.php
  8. 4  lib/Cake/Controller/Component/Auth/BaseAuthenticate.php
  9. 3  lib/Cake/Controller/Component/Auth/BaseAuthorize.php
  10. 6  lib/Cake/Controller/Component/AuthComponent.php
  11. 7  lib/Cake/Controller/Component/CookieComponent.php
  12. 3  lib/Cake/Controller/Component/PaginatorComponent.php
  13. 3  lib/Cake/Controller/Component/SecurityComponent.php
  14. 8  lib/Cake/Core/Object.php
  15. 3  lib/Cake/Model/Behavior/AclBehavior.php
  16. 2  lib/Cake/Model/Behavior/ContainableBehavior.php
  17. 6  lib/Cake/Model/Behavior/TreeBehavior.php
  18. 4  lib/Cake/Model/Datasource/CakeSession.php
  19. 2  lib/Cake/Model/Datasource/Database/Postgres.php
  20. 8  lib/Cake/Model/Datasource/DboSource.php
  21. 16  lib/Cake/Model/Model.php
  22. 10  lib/Cake/Network/CakeRequest.php
  23. 2  lib/Cake/Network/Email/CakeEmail.php
  24. 16  lib/Cake/Network/Http/HttpSocket.php
  25. 2  lib/Cake/Routing/Route/CakeRoute.php
  26. 4  lib/Cake/Routing/Router.php
  27. 2  lib/Cake/Test/Case/Console/ShellTest.php
  28. 38  lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php
  29. 6  lib/Cake/Test/Case/Controller/ControllerTest.php
  30. 28  lib/Cake/Test/Case/Model/AclNodeTest.php
  31. 4  lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php
  32. 12  lib/Cake/Test/Case/Model/BehaviorCollectionTest.php
  33. 18  lib/Cake/Test/Case/Model/ModelReadTest.php
  34. 20  lib/Cake/Test/Case/Model/ModelWriteTest.php
  35. 4  lib/Cake/Test/Case/Network/Http/HttpSocketTest.php
  36. 2  lib/Cake/Test/Case/View/Helper/FormHelperTest.php
  37. 2  lib/Cake/Utility/Debugger.php
  38. 10  lib/Cake/Utility/Hash.php
  39. 4  lib/Cake/View/Helper.php
  40. 6  lib/Cake/View/Helper/FormHelper.php
  41. 2  lib/Cake/View/Helper/NumberHelper.php
  42. 2  lib/Cake/View/Helper/TextHelper.php
  43. 2  lib/Cake/View/Helper/TimeHelper.php
2  lib/Cake/Configure/IniReader.php
@@ -127,7 +127,7 @@ protected function _parseNestedValues($values) {
127 127
 				$value = false;
128 128
 			}
129 129
 			if (strpos($key, '.') !== false) {
130  
-				$values = Set::insert($values, $key, $value);
  130
+				$values = Hash::insert($values, $key, $value);
131 131
 			} else {
132 132
 				$values[$key] = $value;
133 133
 			}
4  lib/Cake/Console/Command/AclShell.php
@@ -21,6 +21,7 @@
21 21
 App::uses('ComponentCollection', 'Controller');
22 22
 App::uses('AclComponent', 'Controller/Component');
23 23
 App::uses('DbAcl', 'Model');
  24
+App::uses('Hash', 'Utility');
24 25
 
25 26
 /**
26 27
  * Shell for ACL management.  This console is known to have issues with zend.ze1_compatibility_mode
@@ -558,8 +559,9 @@ protected function _getNodeId($class, $identifier) {
558 559
 				$identifier = var_export($identifier, true);
559 560
 			}
560 561
 			$this->error(__d('cake_console', 'Could not find node using reference "%s"', $identifier));
  562
+			return;
561 563
 		}
562  
-		return Set::extract($node, "0.{$class}.id");
  564
+		return Hash::get($node, "0.{$class}.id");
563 565
 	}
564 566
 
565 567
 /**
2  lib/Cake/Console/Command/ConsoleShell.php
@@ -300,7 +300,7 @@ public function main($command = null) {
300 300
 				break;
301 301
 				case (preg_match("/^routes\s+show/i", $command, $tmp) == true):
302 302
 					$router = Router::getInstance();
303  
-					$this->out(implode("\n", Set::extract($router->routes, '{n}.0')));
  303
+					$this->out(implode("\n", Hash::extract($router->routes, '{n}.0')));
304 304
 				break;
305 305
 				case (preg_match("/^route\s+(\(.*\))$/i", $command, $tmp) == true):
306 306
 					if ($url = eval('return array' . $tmp[1] . ';')) {
3  lib/Cake/Console/Command/Task/ExtractTask.php
@@ -19,6 +19,7 @@
19 19
 App::uses('AppShell', 'Console/Command');
20 20
 App::uses('File', 'Utility');
21 21
 App::uses('Folder', 'Utility');
  22
+App::uses('Hash', 'Utility');
22 23
 
23 24
 /**
24 25
  * Language string extractor
@@ -431,7 +432,7 @@ protected function _processValidationRules($field, $rules, $file, $domain) {
431 432
 			return;
432 433
 		}
433 434
 
434  
-		$dims = Set::countDim($rules);
  435
+		$dims = Hash::dimensions($rules);
435 436
 		if ($dims == 1 || ($dims == 2 && isset($rules['message']))) {
436 437
 			$rules = array($rules);
437 438
 		}
1  lib/Cake/Controller/Component/Acl/DbAcl.php
@@ -13,6 +13,7 @@
13 13
  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
14 14
  */
15 15
 App::uses('AclInterface', 'Controller/Component/Acl');
  16
+App::uses('Hash', 'Utility');
16 17
 
17 18
 /**
18 19
  * DbAcl implements an ACL control system in the database.  ARO's and ACO's are
4  lib/Cake/Controller/Component/Acl/IniAcl.php
@@ -30,7 +30,7 @@ class IniAcl extends Object implements AclInterface {
30 30
 	public $config = null;
31 31
 
32 32
 /**
33  
- * The Set::classicExtract() path to the user/aro identifier in the
  33
+ * The Hash::extract() path to the user/aro identifier in the
34 34
  * acl.ini file.  This path will be used to extract the string
35 35
  * representation of a user used in the ini file.
36 36
  *
@@ -97,7 +97,7 @@ public function check($aro, $aco, $action = null) {
97 97
 		$aclConfig = $this->config;
98 98
 
99 99
 		if (is_array($aro)) {
100  
-			$aro = Set::classicExtract($aro, $this->userPath);
  100
+			$aro = Hash::get($aro, $this->userPath);
101 101
 		}
102 102
 
103 103
 		if (isset($aclConfig[$aro]['deny'])) {
2  lib/Cake/Controller/Component/Acl/PhpAcl.php
@@ -494,7 +494,7 @@ public function addRole(array $aro) {
494 494
 					// detect cycles
495 495
 					$roles = $this->roles($dependency);
496 496
 
497  
-					if (in_array($role, Set::flatten($roles))) {
  497
+					if (in_array($role, Hash::flatten($roles))) {
498 498
 						$path = '';
499 499
 
500 500
 						foreach ($roles as $roleDependencies) {
4  lib/Cake/Controller/Component/Auth/BaseAuthenticate.php
@@ -12,8 +12,8 @@
12 12
  * @link          http://cakephp.org CakePHP(tm) Project
13 13
  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
14 14
  */
15  
-
16 15
 App::uses('Security', 'Utility');
  16
+App::uses('Hash', 'Utility');
17 17
 
18 18
 /**
19 19
  * Base Authentication class with common methods and properties.
@@ -58,7 +58,7 @@
58 58
  */
59 59
 	public function __construct(ComponentCollection $collection, $settings) {
60 60
 		$this->_Collection = $collection;
61  
-		$this->settings = Set::merge($this->settings, $settings);
  61
+		$this->settings = Hash::merge($this->settings, $settings);
62 62
 	}
63 63
 
64 64
 /**
3  lib/Cake/Controller/Component/Auth/BaseAuthorize.php
@@ -12,6 +12,7 @@
12 12
  * @link          http://cakephp.org CakePHP(tm) Project
13 13
  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
14 14
  */
  15
+App::uses('Hash', 'Utility');
15 16
 
16 17
 /**
17 18
  * Abstract base authorization adapter for AuthComponent.
@@ -69,7 +70,7 @@ public function __construct(ComponentCollection $collection, $settings = array()
69 70
 		$this->_Collection = $collection;
70 71
 		$controller = $collection->getController();
71 72
 		$this->controller($controller);
72  
-		$this->settings = Set::merge($this->settings, $settings);
  73
+		$this->settings = Hash::merge($this->settings, $settings);
73 74
 	}
74 75
 
75 76
 /**
6  lib/Cake/Controller/Component/AuthComponent.php
@@ -19,11 +19,11 @@
19 19
  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
20 20
  */
21 21
 
22  
-
23 22
 App::uses('Component', 'Controller');
24 23
 App::uses('Router', 'Routing');
25 24
 App::uses('Security', 'Utility');
26 25
 App::uses('Debugger', 'Utility');
  26
+App::uses('Hash', 'Utility');
27 27
 App::uses('CakeSession', 'Model/Datasource');
28 28
 App::uses('BaseAuthorize', 'Controller/Component/Auth');
29 29
 App::uses('BaseAuthenticate', 'Controller/Component/Auth');
@@ -394,7 +394,7 @@ public function constructAuthorize() {
394 394
 			return;
395 395
 		}
396 396
 		$this->_authorizeObjects = array();
397  
-		$config = Set::normalize($this->authorize);
  397
+		$config = Hash::normalize((array)$this->authorize);
398 398
 		$global = array();
399 399
 		if (isset($config[AuthComponent::ALL])) {
400 400
 			$global = $config[AuthComponent::ALL];
@@ -652,7 +652,7 @@ public function constructAuthenticate() {
652 652
 			return;
653 653
 		}
654 654
 		$this->_authenticateObjects = array();
655  
-		$config = Set::normalize($this->authenticate);
  655
+		$config = Hash::normalize((array)$this->authenticate);
656 656
 		$global = array();
657 657
 		if (isset($config[AuthComponent::ALL])) {
658 658
 			$global = $config[AuthComponent::ALL];
7  lib/Cake/Controller/Component/CookieComponent.php
@@ -19,6 +19,7 @@
19 19
 
20 20
 App::uses('Component', 'Controller');
21 21
 App::uses('Security', 'Utility');
  22
+App::uses('Hash', 'Utility');
22 23
 
23 24
 /**
24 25
  * Cookie Component.
@@ -239,7 +240,7 @@ public function write($key, $value = null, $encrypt = true, $expires = null) {
239 240
 				if (!isset($this->_values[$this->name][$names[0]])) {
240 241
 					$this->_values[$this->name][$names[0]] = array();
241 242
 				}
242  
-				$this->_values[$this->name][$names[0]] = Set::insert($this->_values[$this->name][$names[0]], $names[1], $value);
  243
+				$this->_values[$this->name][$names[0]] = Hash::insert($this->_values[$this->name][$names[0]], $names[1], $value);
243 244
 				$this->_write('[' . implode('][', $names) . ']', $value);
244 245
 			}
245 246
 		}
@@ -276,7 +277,7 @@ public function read($key = null) {
276 277
 		}
277 278
 
278 279
 		if (!empty($names[1])) {
279  
-			return Set::extract($this->_values[$this->name][$key], $names[1]);
  280
+			return Hash::get($this->_values[$this->name][$key], $names[1]);
280 281
 		}
281 282
 		return $this->_values[$this->name][$key];
282 283
 	}
@@ -310,7 +311,7 @@ public function delete($key) {
310 311
 		}
311 312
 		$names = explode('.', $key, 2);
312 313
 		if (isset($this->_values[$this->name][$names[0]])) {
313  
-			$this->_values[$this->name][$names[0]] = Set::remove($this->_values[$this->name][$names[0]], $names[1]);
  314
+			$this->_values[$this->name][$names[0]] = Hash::remove($this->_values[$this->name][$names[0]], $names[1]);
314 315
 		}
315 316
 		$this->_delete('[' . implode('][', $names) . ']');
316 317
 	}
3  lib/Cake/Controller/Component/PaginatorComponent.php
@@ -16,6 +16,7 @@
16 16
  * @since         CakePHP(tm) v 2.0
17 17
  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
18 18
  */
  19
+App::uses('Hash', 'Utility');
19 20
 
20 21
 /**
21 22
  * This component is used to handle automatic model data pagination.  The primary way to use this
@@ -194,7 +195,7 @@ public function paginate($object = null, $scope = array(), $whitelist = array())
194 195
 			'pageCount' => $pageCount,
195 196
 			'order' => $order,
196 197
 			'limit' => $limit,
197  
-			'options' => Set::diff($options, $defaults),
  198
+			'options' => Hash::diff($options, $defaults),
198 199
 			'paramType' => $options['paramType']
199 200
 		);
200 201
 		if (!isset($this->Controller->request['paging'])) {
3  lib/Cake/Controller/Component/SecurityComponent.php
@@ -19,6 +19,7 @@
19 19
 
20 20
 App::uses('Component', 'Controller');
21 21
 App::uses('String', 'Utility');
  22
+App::uses('Hash', 'Utility');
22 23
 App::uses('Security', 'Utility');
23 24
 
24 25
 /**
@@ -443,7 +444,7 @@ protected function _validatePost(Controller $controller) {
443 444
 		$unlocked = explode('|', $unlocked);
444 445
 
445 446
 		$lockedFields = array();
446  
-		$fields = Set::flatten($check);
  447
+		$fields = Hash::flatten($check);
447 448
 		$fieldList = array_keys($fields);
448 449
 		$multi = array();
449 450
 
8  lib/Cake/Core/Object.php
@@ -181,7 +181,7 @@ protected function _set($properties = array()) {
181 181
  *
182 182
  * @param array $properties The name of the properties to merge.
183 183
  * @param string $class The class to merge the property with.
184  
- * @param boolean $normalize Set to true to run the properties through Set::normalize() before merging.
  184
+ * @param boolean $normalize Set to true to run the properties through Hash::normalize() before merging.
185 185
  * @return void
186 186
  */
187 187
 	protected function _mergeVars($properties, $class, $normalize = true) {
@@ -194,10 +194,10 @@ protected function _mergeVars($properties, $class, $normalize = true) {
194 194
 				$this->{$var} != $classProperties[$var]
195 195
 			) {
196 196
 				if ($normalize) {
197  
-					$classProperties[$var] = Set::normalize($classProperties[$var]);
198  
-					$this->{$var} = Set::normalize($this->{$var});
  197
+					$classProperties[$var] = Hash::normalize($classProperties[$var]);
  198
+					$this->{$var} = Hash::normalize($this->{$var});
199 199
 				}
200  
-				$this->{$var} = Set::merge($classProperties[$var], $this->{$var});
  200
+				$this->{$var} = Hash::merge($classProperties[$var], $this->{$var});
201 201
 			}
202 202
 		}
203 203
 	}
3  lib/Cake/Model/Behavior/AclBehavior.php
@@ -19,6 +19,7 @@
19 19
  * @license       MIT License (http://www.opensource.org/licenses/mit-license.php)
20 20
  */
21 21
 App::uses('AclNode', 'Model');
  22
+App::uses('Hash', 'Utility');
22 23
 
23 24
 /**
24 25
  * ACL behavior
@@ -131,7 +132,7 @@ public function afterDelete(Model $model) {
131 132
 			$types = array($types);
132 133
 		}
133 134
 		foreach ($types as $type) {
134  
-			$node = Set::extract($this->node($model, null, $type), "0.{$type}.id");
  135
+			$node = Hash::extract($this->node($model, null, $type), "0.{$type}.id");
135 136
 			if (!empty($node)) {
136 137
 				$model->{$type}->delete($node);
137 138
 			}
2  lib/Cake/Model/Behavior/ContainableBehavior.php
@@ -321,7 +321,7 @@ public function containments(Model $Model, $contain, $containments = array(), $t
321 321
 					$key = $option;
322 322
 					$optionKey = true;
323 323
 					if (!empty($newChildren)) {
324  
-						$children = Set::merge($children, $newChildren);
  324
+						$children = Hash::merge($children, $newChildren);
325 325
 					}
326 326
 				}
327 327
 				if ($optionKey && isset($children[$key])) {
6  lib/Cake/Model/Behavior/TreeBehavior.php
@@ -363,10 +363,10 @@ public function generateTreeList(Model $Model, $conditions = null, $keyPath = nu
363 363
 		}
364 364
 
365 365
 		if ($valuePath == null) {
366  
-			$valuePath = array('{0}{1}', '{n}.tree_prefix', '{n}.' . $Model->alias . '.' . $Model->displayField);
  366
+			$valuePath = array('%s%s', '{n}.tree_prefix', '{n}.' . $Model->alias . '.' . $Model->displayField);
367 367
 
368 368
 		} elseif (is_string($valuePath)) {
369  
-			$valuePath = array('{0}{1}', '{n}.tree_prefix', $valuePath);
  369
+			$valuePath = array('%s%s', '{n}.tree_prefix', $valuePath);
370 370
 
371 371
 		} else {
372 372
 			$valuePath[0] = '{' . (count($valuePath) - 1) . '}' . $valuePath[0];
@@ -386,7 +386,7 @@ public function generateTreeList(Model $Model, $conditions = null, $keyPath = nu
386 386
 		if (empty($results)) {
387 387
 			return array();
388 388
 		}
389  
-		return Set::combine($results, $keyPath, $valuePath);
  389
+		return Hash::combine($results, $keyPath, $valuePath);
390 390
 	}
391 391
 
392 392
 /**
4  lib/Cake/Model/Datasource/CakeSession.php
@@ -245,7 +245,7 @@ public static function id($id = null) {
245 245
  */
246 246
 	public static function delete($name) {
247 247
 		if (self::check($name)) {
248  
-			self::_overwrite($_SESSION, Set::remove($_SESSION, $name));
  248
+			self::_overwrite($_SESSION, Hash::remove($_SESSION, $name));
249 249
 			return (self::check($name) == false);
250 250
 		}
251 251
 		self::_setError(2, __d('cake_dev', "%s doesn't exist", $name));
@@ -452,7 +452,7 @@ protected static function _configureSession() {
452 452
 		if (isset($sessionConfig['defaults'])) {
453 453
 			$defaults = self::_defaultConfig($sessionConfig['defaults']);
454 454
 			if ($defaults) {
455  
-				$sessionConfig = Set::merge($defaults, $sessionConfig);
  455
+				$sessionConfig = Hash::merge($defaults, $sessionConfig);
456 456
 			}
457 457
 		}
458 458
 		if (!isset($sessionConfig['ini']['session.cookie_secure']) && env('HTTPS')) {
2  lib/Cake/Model/Datasource/Database/Postgres.php
@@ -421,7 +421,7 @@ protected function _quoteFunctionField($match) {
421 421
 			$match[1] = $this->name($match[1]);
422 422
 		} elseif (!$constant) {
423 423
 			$parts = explode('.', $match[1]);
424  
-			if (!Set::numeric($parts)) {
  424
+			if (!Hash::numeric($parts)) {
425 425
 				$match[1] = $this->name($match[1]);
426 426
 			}
427 427
 		}
8  lib/Cake/Model/Datasource/DboSource.php
@@ -1409,7 +1409,7 @@ protected function _mergeAssociation(&$data, &$merge, $association, $type, $self
1409 1409
 						if ($mergeKeys[0] === $dataKeys[0] || $mergeKeys === $dataKeys) {
1410 1410
 							$data[$association][$association] = $merge[0][$association];
1411 1411
 						} else {
1412  
-							$diff = Set::diff($dataAssocTmp, $mergeAssocTmp);
  1412
+							$diff = Hash::diff($dataAssocTmp, $mergeAssocTmp);
1413 1413
 							$data[$association] = array_merge($merge[0][$association], $diff);
1414 1414
 						}
1415 1415
 					} elseif ($selfJoin && array_key_exists($association, $merge[0])) {
@@ -1934,7 +1934,7 @@ protected function _matchRecords(Model $model, $conditions = null) {
1934 1934
 				return false;
1935 1935
 			}
1936 1936
 			$conditions = $this->conditions(array(
1937  
-				$model->primaryKey => Set::extract($idList, "{n}.{$model->alias}.{$model->primaryKey}")
  1937
+				$model->primaryKey => Hash::extract($idList, "{n}.{$model->alias}.{$model->primaryKey}")
1938 1938
 			));
1939 1939
 		}
1940 1940
 		return $conditions;
@@ -2256,7 +2256,7 @@ public function fields(Model $model, $alias = null, $fields = array(), $quote =
2256 2256
 					} else {
2257 2257
 						if (strpos($fields[$i], ',') === false) {
2258 2258
 							$build = explode('.', $fields[$i]);
2259  
-							if (!Set::numeric($build)) {
  2259
+							if (!Hash::numeric($build)) {
2260 2260
 								$fields[$i] = $this->name(implode('.', $build));
2261 2261
 							}
2262 2262
 						}
@@ -2268,7 +2268,7 @@ public function fields(Model $model, $alias = null, $fields = array(), $quote =
2268 2268
 							$field[1] = $this->name($alias . '.' . $field[1]);
2269 2269
 						} else {
2270 2270
 							$field[0] = explode('.', $field[1]);
2271  
-							if (!Set::numeric($field[0])) {
  2271
+							if (!Hash::numeric($field[0])) {
2272 2272
 								$field[0] = implode('.', array_map(array(&$this, 'name'), $field[0]));
2273 2273
 								$fields[$i] = preg_replace('/\(' . $field[1] . '\)/', '(' . $field[0] . ')', $fields[$i], 1);
2274 2274
 							}
16  lib/Cake/Model/Model.php
@@ -1728,7 +1728,7 @@ public function save($data = null, $validate = true, $fieldList = array()) {
1728 1728
 				$this->getEventManager()->dispatch($event);
1729 1729
 			}
1730 1730
 			if (!empty($this->data)) {
1731  
-				$success = Set::merge($success, $this->data);
  1731
+				$success = Hash::merge($success, $this->data);
1732 1732
 			}
1733 1733
 			$this->data = false;
1734 1734
 			$this->_clearCache();
@@ -1819,7 +1819,7 @@ protected function _saveMulti($joined, $id, $db) {
1819 1819
 						'fields' => $associationForeignKey,
1820 1820
 					));
1821 1821
 
1822  
-					$oldLinks = Set::extract($links, "{n}.{$associationForeignKey}");
  1822
+					$oldLinks = Hash::extract($links, "{n}.{$associationForeignKey}");
1823 1823
 					if (!empty($oldLinks)) {
1824 1824
 						if ($keepExisting && !empty($newJoins)) {
1825 1825
 							$conditions[$associationForeignKey] = array_diff($oldLinks, $newJoins);
@@ -1993,7 +1993,7 @@ protected function _prepareUpdateFields($data) {
1993 1993
  */
1994 1994
 	public function saveAll($data = null, $options = array()) {
1995 1995
 		$options = array_merge(array('validate' => 'first'), $options);
1996  
-		if (Set::numeric(array_keys($data))) {
  1996
+		if (Hash::numeric(array_keys($data))) {
1997 1997
 			if ($options['validate'] === 'only') {
1998 1998
 				return $this->validateMany($data, $options);
1999 1999
 			}
@@ -2514,7 +2514,7 @@ public function deleteAll($conditions, $cascade = true, $callbacks = false) {
2514 2514
 				return false;
2515 2515
 			}
2516 2516
 
2517  
-			$ids = Set::extract($ids, "{n}.{$this->alias}.{$this->primaryKey}");
  2517
+			$ids = Hash::extract($ids, "{n}.{$this->alias}.{$this->primaryKey}");
2518 2518
 			if (empty($ids)) {
2519 2519
 				return true;
2520 2520
 			}
@@ -2837,7 +2837,7 @@ protected function _findList($state, $query, $results = array()) {
2837 2837
 				return array();
2838 2838
 			}
2839 2839
 			$lst = $query['list'];
2840  
-			return Set::combine($results, $lst['keyPath'], $lst['valuePath'], $lst['groupPath']);
  2840
+			return Hash::combine($results, $lst['keyPath'], $lst['valuePath'], $lst['groupPath']);
2841 2841
 		}
2842 2842
 	}
2843 2843
 
@@ -2915,9 +2915,9 @@ protected function _findThreaded($state, $query, $results = array()) {
2915 2915
 			if (isset($query['parent'])) {
2916 2916
 				$parent = $query['parent'];
2917 2917
 			}
2918  
-			return Set::nest($results, array(
2919  
-				'idPath' => '/' . $this->alias . '/' . $this->primaryKey,
2920  
-				'parentPath' => '/' . $this->alias . '/' . $parent
  2918
+			return Hash::nest($results, array(
  2919
+				'idPath' => '{n}.' . $this->alias . '.' . $this->primaryKey,
  2920
+				'parentPath' => '{n}.' . $this->alias . '.' . $parent
2921 2921
 			));
2922 2922
 		}
2923 2923
 	}
10  lib/Cake/Network/CakeRequest.php
@@ -153,7 +153,7 @@ public function __construct($url = null, $parseEnvironment = true) {
153 153
  * into a single array. Variables prefixed with `data` will overwrite those without.
154 154
  *
155 155
  * If you have mixed POST values be careful not to make any top level keys numeric
156  
- * containing arrays. Set::merge() is used to merge data, and it has possibly
  156
+ * containing arrays. Hash::merge() is used to merge data, and it has possibly
157 157
  * unexpected behavior in this situation.
158 158
  *
159 159
  * @return void
@@ -181,7 +181,7 @@ protected function _processPost() {
181 181
 				$this->data = $data;
182 182
 			} else {
183 183
 				unset($this->data['data']);
184  
-				$this->data = Set::merge($this->data, $data);
  184
+				$this->data = Hash::merge($this->data, $data);
185 185
 			}
186 186
 		}
187 187
 	}
@@ -519,7 +519,7 @@ public function is($type) {
519 519
 	public function addDetector($name, $options) {
520 520
 		$name = strtolower($name);
521 521
 		if (isset($this->_detectors[$name]) && isset($options['options'])) {
522  
-			$options = Set::merge($this->_detectors[$name], $options);
  522
+			$options = Hash::merge($this->_detectors[$name], $options);
523 523
 		}
524 524
 		$this->_detectors[$name] = $options;
525 525
 	}
@@ -748,10 +748,10 @@ public static function acceptLanguage($language = null) {
748 748
 	public function data($name) {
749 749
 		$args = func_get_args();
750 750
 		if (count($args) == 2) {
751  
-			$this->data = Set::insert($this->data, $name, $args[1]);
  751
+			$this->data = Hash::insert($this->data, $name, $args[1]);
752 752
 			return $this;
753 753
 		}
754  
-		return Set::classicExtract($this->data, $name);
  754
+		return Hash::get($this->data, $name);
755 755
 	}
756 756
 
757 757
 /**
2  lib/Cake/Network/Email/CakeEmail.php
@@ -1363,7 +1363,7 @@ protected function _render($content) {
1363 1363
 
1364 1364
 		$msg = array();
1365 1365
 
1366  
-		$contentIds = array_filter((array)Set::classicExtract($this->_attachments, '{s}.contentId'));
  1366
+		$contentIds = array_filter((array)Hash::extract($this->_attachments, '{s}.contentId'));
1367 1367
 		$hasInlineAttachments = count($contentIds) > 0;
1368 1368
 		$hasAttachments = !empty($this->_attachments);
1369 1369
 		$hasMultipleTypes = count($rendered) > 1;
16  lib/Cake/Network/Http/HttpSocket.php
@@ -153,7 +153,7 @@ public function __construct($config = array()) {
153 153
 				$this->_configUri($config['request']['uri']);
154 154
 				unset($config['request']['uri']);
155 155
 			}
156  
-			$this->config = Set::merge($this->config, $config);
  156
+			$this->config = Hash::merge($this->config, $config);
157 157
 		}
158 158
 		parent::__construct($this->config);
159 159
 	}
@@ -271,7 +271,7 @@ public function request($request = array()) {
271 271
 		}
272 272
 		$request['uri'] = $this->url($request['uri']);
273 273
 		$request['uri'] = $this->_parseUri($request['uri'], true);
274  
-		$this->request = Set::merge($this->request, array_diff_key($this->config['request'], array('cookies' => true)), $request);
  274
+		$this->request = Hash::merge($this->request, array_diff_key($this->config['request'], array('cookies' => true)), $request);
275 275
 
276 276
 		$this->_configUri($this->request['uri']);
277 277
 
@@ -446,7 +446,7 @@ public function get($uri = null, $query = array(), $request = array()) {
446 446
 			$uri = $this->_buildUri($uri);
447 447
 		}
448 448
 
449  
-		$request = Set::merge(array('method' => 'GET', 'uri' => $uri), $request);
  449
+		$request = Hash::merge(array('method' => 'GET', 'uri' => $uri), $request);
450 450
 		return $this->request($request);
451 451
 	}
452 452
 
@@ -468,7 +468,7 @@ public function get($uri = null, $query = array(), $request = array()) {
468 468
  * @return mixed Result of request, either false on failure or the response to the request.
469 469
  */
470 470
 	public function post($uri = null, $data = array(), $request = array()) {
471  
-		$request = Set::merge(array('method' => 'POST', 'uri' => $uri, 'body' => $data), $request);
  471
+		$request = Hash::merge(array('method' => 'POST', 'uri' => $uri, 'body' => $data), $request);
472 472
 		return $this->request($request);
473 473
 	}
474 474
 
@@ -481,7 +481,7 @@ public function post($uri = null, $data = array(), $request = array()) {
481 481
  * @return mixed Result of request
482 482
  */
483 483
 	public function put($uri = null, $data = array(), $request = array()) {
484  
-		$request = Set::merge(array('method' => 'PUT', 'uri' => $uri, 'body' => $data), $request);
  484
+		$request = Hash::merge(array('method' => 'PUT', 'uri' => $uri, 'body' => $data), $request);
485 485
 		return $this->request($request);
486 486
 	}
487 487
 
@@ -494,7 +494,7 @@ public function put($uri = null, $data = array(), $request = array()) {
494 494
  * @return mixed Result of request
495 495
  */
496 496
 	public function delete($uri = null, $data = array(), $request = array()) {
497  
-		$request = Set::merge(array('method' => 'DELETE', 'uri' => $uri, 'body' => $data), $request);
  497
+		$request = Hash::merge(array('method' => 'DELETE', 'uri' => $uri, 'body' => $data), $request);
498 498
 		return $this->request($request);
499 499
 	}
500 500
 
@@ -639,8 +639,8 @@ protected function _configUri($uri = null) {
639 639
 				'uri' => array_intersect_key($uri, $this->config['request']['uri'])
640 640
 			)
641 641
 		);
642  
-		$this->config = Set::merge($this->config, $config);
643  
-		$this->config = Set::merge($this->config, array_intersect_key($this->config['request']['uri'], $this->config));
  642
+		$this->config = Hash::merge($this->config, $config);
  643
+		$this->config = Hash::merge($this->config, array_intersect_key($this->config['request']['uri'], $this->config));
644 644
 		return true;
645 645
 	}
646 646
 
2  lib/Cake/Routing/Route/CakeRoute.php
@@ -494,7 +494,7 @@ protected function _writeUrl($params) {
494 494
 			$named = array();
495 495
 			foreach ($params['named'] as $key => $value) {
496 496
 				if (is_array($value)) {
497  
-					$flat = Set::flatten($value, '][');
  497
+					$flat = Hash::flatten($value, '][');
498 498
 					foreach ($flat as $namedKey => $namedValue) {
499 499
 						$named[] = $key . "[$namedKey]" . $separator . rawurlencode($namedValue);
500 500
 					}
4  lib/Cake/Routing/Router.php
@@ -890,7 +890,7 @@ protected static function _handleNoRoute($url) {
890 890
 			}
891 891
 		}
892 892
 
893  
-		list($args, $named) = array(Set::filter($args, true), Set::filter($named, true));
  893
+		list($args, $named) = array(Hash::filter($args), Hash::filter($named));
894 894
 		foreach (self::$_prefixes as $prefix) {
895 895
 			if (!empty($url[$prefix])) {
896 896
 				$url['action'] = str_replace($prefix . '_', '', $url['action']);
@@ -923,7 +923,7 @@ protected static function _handleNoRoute($url) {
923 923
 		if (!empty($named)) {
924 924
 			foreach ($named as $name => $value) {
925 925
 				if (is_array($value)) {
926  
-					$flattend = Set::flatten($value, '][');
  926
+					$flattend = Hash::flatten($value, '][');
927 927
 					foreach ($flattend as $namedKey => $namedValue) {
928 928
 						$output .= '/' . $name . "[$namedKey]" . self::$_namedConfig['separator'] . rawurlencode($namedValue);
929 929
 					}
2  lib/Cake/Test/Case/Console/ShellTest.php
@@ -161,7 +161,7 @@ public function testMergeVars() {
161 161
 		$this->assertEquals($expected, $this->Shell->tasks);
162 162
 
163 163
 		$expected = array('Fixture' => null, 'DbConfig' => array('one', 'two'));
164  
-		$this->assertEquals($expected, Set::normalize($this->Shell->tasks), 'Normalized results are wrong.');
  164
+		$this->assertEquals($expected, Hash::normalize($this->Shell->tasks), 'Normalized results are wrong.');
165 165
 		$this->assertEquals(array('Comment', 'Posts'), $this->Shell->uses, 'Merged models are wrong.');
166 166
 	}
167 167
 
38  lib/Cake/Test/Case/Controller/Component/PaginatorComponentTest.php
@@ -108,7 +108,7 @@ public function beforeFind($query) {
108 108
 	public function find($conditions = null, $fields = array(), $order = null, $recursive = null) {
109 109
 		if ($conditions == 'popular') {
110 110
 			$conditions = array($this->name . '.' . $this->primaryKey . ' > ' => '1');
111  
-			$options = Set::merge($fields, compact('conditions'));
  111
+			$options = Hash::merge($fields, compact('conditions'));
112 112
 			return parent::find('all', $options);
113 113
 		}
114 114
 		return parent::find($conditions, $fields);
@@ -352,47 +352,47 @@ public function testPaginate() {
352 352
 		$Controller->request->query = array();
353 353
 		$Controller->constructClasses();
354 354
 
355  
-		$results = Set::extract($Controller->Paginator->paginate('PaginatorControllerPost'), '{n}.PaginatorControllerPost.id');
  355
+		$results = Hash::extract($Controller->Paginator->paginate('PaginatorControllerPost'), '{n}.PaginatorControllerPost.id');
356 356
 		$this->assertEquals(array(1, 2, 3), $results);
357 357
 
358  
-		$results = Set::extract($Controller->Paginator->paginate('PaginatorControllerComment'), '{n}.PaginatorControllerComment.id');
  358
+		$results = Hash::extract($Controller->Paginator->paginate('PaginatorControllerComment'), '{n}.PaginatorControllerComment.id');
359 359
 		$this->assertEquals(array(1, 2, 3, 4, 5, 6), $results);
360 360
 
361 361
 		$Controller->modelClass = null;
362 362
 
363 363
 		$Controller->uses[0] = 'Plugin.PaginatorControllerPost';
364  
-		$results = Set::extract($Controller->Paginator->paginate(), '{n}.PaginatorControllerPost.id');
  364
+		$results = Hash::extract($Controller->Paginator->paginate(), '{n}.PaginatorControllerPost.id');
365 365
 		$this->assertEquals(array(1, 2, 3), $results);
366 366
 
367 367
 		$Controller->request->params['named'] = array('page' => '-1');
368  
-		$results = Set::extract($Controller->Paginator->paginate('PaginatorControllerPost'), '{n}.PaginatorControllerPost.id');
  368
+		$results = Hash::extract($Controller->Paginator->paginate('PaginatorControllerPost'), '{n}.PaginatorControllerPost.id');
369 369
 		$this->assertEquals(1, $Controller->params['paging']['PaginatorControllerPost']['page']);
370 370
 		$this->assertEquals(array(1, 2, 3), $results);
371 371
 
372 372
 		$Controller->request->params['named'] = array('sort' => 'PaginatorControllerPost.id', 'direction' => 'asc');
373  
-		$results = Set::extract($Controller->Paginator->paginate('PaginatorControllerPost'), '{n}.PaginatorControllerPost.id');
  373
+		$results = Hash::extract($Controller->Paginator->paginate('PaginatorControllerPost'), '{n}.PaginatorControllerPost.id');
374 374
 		$this->assertEquals(1, $Controller->params['paging']['PaginatorControllerPost']['page']);
375 375
 		$this->assertEquals(array(1, 2, 3), $results);
376 376
 
377 377
 		$Controller->request->params['named'] = array('sort' => 'PaginatorControllerPost.id', 'direction' => 'desc');
378  
-		$results = Set::extract($Controller->Paginator->paginate('PaginatorControllerPost'), '{n}.PaginatorControllerPost.id');
  378
+		$results = Hash::extract($Controller->Paginator->paginate('PaginatorControllerPost'), '{n}.PaginatorControllerPost.id');
379 379
 		$this->assertEquals(1, $Controller->params['paging']['PaginatorControllerPost']['page']);
380 380
 		$this->assertEquals(array(3, 2, 1), $results);
381 381
 
382 382
 		$Controller->request->params['named'] = array('sort' => 'id', 'direction' => 'desc');
383  
-		$results = Set::extract($Controller->Paginator->paginate('PaginatorControllerPost'), '{n}.PaginatorControllerPost.id');
  383
+		$results = Hash::extract($Controller->Paginator->paginate('PaginatorControllerPost'), '{n}.PaginatorControllerPost.id');
384 384
 		$this->assertEquals(1, $Controller->params['paging']['PaginatorControllerPost']['page']);
385 385
 		$this->assertEquals(array(3, 2, 1), $results);
386 386
 
387 387
 		$Controller->request->params['named'] = array('sort' => 'NotExisting.field', 'direction' => 'desc');
388  
-		$results = Set::extract($Controller->Paginator->paginate('PaginatorControllerPost'), '{n}.PaginatorControllerPost.id');
  388
+		$results = Hash::extract($Controller->Paginator->paginate('PaginatorControllerPost'), '{n}.PaginatorControllerPost.id');
389 389
 		$this->assertEquals(1, $Controller->params['paging']['PaginatorControllerPost']['page'], 'Invalid field in query %s');
390 390
 		$this->assertEquals(array(1, 2, 3), $results);
391 391
 
392 392
 		$Controller->request->params['named'] = array(
393 393
 			'sort' => 'PaginatorControllerPost.author_id', 'direction' => 'allYourBase'
394 394
 		);
395  
-		$results = Set::extract($Controller->Paginator->paginate('PaginatorControllerPost'), '{n}.PaginatorControllerPost.id');
  395
+		$results = Hash::extract($Controller->Paginator->paginate('PaginatorControllerPost'), '{n}.PaginatorControllerPost.id');
396 396
 		$this->assertEquals(array('PaginatorControllerPost.author_id' => 'asc'), $Controller->PaginatorControllerPost->lastQueries[1]['order'][0]);
397 397
 		$this->assertEquals(array(1, 3, 2), $results);
398 398
 
@@ -469,7 +469,7 @@ public function testPaginateExtraParams() {
469 469
 		$Controller->request->params['named'] = array('page' => '-1', 'contain' => array('PaginatorControllerComment'));
470 470
 		$result = $Controller->Paginator->paginate('PaginatorControllerPost');
471 471
 		$this->assertEquals(1, $Controller->params['paging']['PaginatorControllerPost']['page']);
472  
-		$this->assertEquals(array(1, 2, 3), Set::extract($result, '{n}.PaginatorControllerPost.id'));
  472
+		$this->assertEquals(array(1, 2, 3), Hash::extract($result, '{n}.PaginatorControllerPost.id'));
473 473
 		$this->assertTrue(!isset($Controller->PaginatorControllerPost->lastQueries[1]['contain']));
474 474
 
475 475
 		$Controller->request->params['named'] = array('page' => '-1');
@@ -482,7 +482,7 @@ public function testPaginateExtraParams() {
482 482
 		);
483 483
 		$result = $Controller->Paginator->paginate('PaginatorControllerPost');
484 484
 		$this->assertEquals(1, $Controller->params['paging']['PaginatorControllerPost']['page']);
485  
-		$this->assertEquals(array(1, 2, 3), Set::extract($result, '{n}.PaginatorControllerPost.id'));
  485
+		$this->assertEquals(array(1, 2, 3), Hash::extract($result, '{n}.PaginatorControllerPost.id'));
486 486
 		$this->assertTrue(isset($Controller->PaginatorControllerPost->lastQueries[1]['contain']));
487 487
 
488 488
 		$Controller->Paginator->settings = array(
@@ -491,7 +491,7 @@ public function testPaginateExtraParams() {
491 491
 			),
492 492
 		);
493 493
 		$result = $Controller->Paginator->paginate('PaginatorControllerPost');
494  
-		$this->assertEquals(array(2, 3), Set::extract($result, '{n}.PaginatorControllerPost.id'));
  494
+		$this->assertEquals(array(2, 3), Hash::extract($result, '{n}.PaginatorControllerPost.id'));
495 495
 		$this->assertEquals(array('PaginatorControllerPost.id > ' => '1'), $Controller->PaginatorControllerPost->lastQueries[1]['conditions']);
496 496
 
497 497
 		$Controller->request->params['named'] = array('limit' => 12);
@@ -566,7 +566,7 @@ public function testPaginateSpecialType() {
566 566
 		);
567 567
 		$result = $Controller->Paginator->paginate('PaginatorControllerPost');
568 568
 
569  
-		$this->assertEquals(array(2, 3), Set::extract($result, '{n}.PaginatorControllerPost.id'));
  569
+		$this->assertEquals(array(2, 3), Hash::extract($result, '{n}.PaginatorControllerPost.id'));
570 570
 		$this->assertEquals(
571 571
 			$Controller->PaginatorControllerPost->lastQueries[1]['conditions'],
572 572
 			array('PaginatorControllerPost.id > ' => '1')
@@ -589,7 +589,7 @@ public function testDefaultPaginateParams() {
589 589
 			'maxLimit' => 10,
590 590
 			'paramType' => 'named'
591 591
 		);
592  
-		$results = Set::extract($Controller->Paginator->paginate('PaginatorControllerPost'), '{n}.PaginatorControllerPost.id');
  592
+		$results = Hash::extract($Controller->Paginator->paginate('PaginatorControllerPost'), '{n}.PaginatorControllerPost.id');
593 593
 		$this->assertEquals('PaginatorControllerPost.id DESC', $Controller->params['paging']['PaginatorControllerPost']['order']);
594 594
 		$this->assertEquals(array(3, 2, 1), $results);
595 595
 	}
@@ -615,7 +615,7 @@ public function testPaginateOrderVirtualField() {
615 615
 			'paramType' => 'named'
616 616
 		);
617 617
 		$result = $Controller->Paginator->paginate('PaginatorControllerPost');
618  
-		$this->assertEquals(array(4, 3, 2), Set::extract($result, '{n}.PaginatorControllerPost.offset_test'));
  618
+		$this->assertEquals(array(4, 3, 2), Hash::extract($result, '{n}.PaginatorControllerPost.offset_test'));
619 619
 
620 620
 		$Controller->request->params['named'] = array('sort' => 'offset_test', 'direction' => 'asc');
621 621
 		$result = $Controller->Paginator->paginate('PaginatorControllerPost');
@@ -639,11 +639,11 @@ public function testPaginateOrderVirtualFieldJoinedModel() {
639 639
 			'paramType' => 'named'
640 640
 		);
641 641
 		$result = $Controller->Paginator->paginate('PaginatorControllerPost');
642  
-		$this->assertEquals(array(4, 2, 2), Set::extract($result, '{n}.PaginatorAuthor.joined_offset'));
  642
+		$this->assertEquals(array(4, 2, 2), Hash::extract($result, '{n}.PaginatorAuthor.joined_offset'));
643 643
 
644 644
 		$Controller->request->params['named'] = array('sort' => 'PaginatorAuthor.joined_offset', 'direction' => 'asc');
645 645
 		$result = $Controller->Paginator->paginate('PaginatorControllerPost');
646  
-		$this->assertEquals(array(2, 2, 4), Set::extract($result, '{n}.PaginatorAuthor.joined_offset'));
  646
+		$this->assertEquals(array(2, 2, 4), Hash::extract($result, '{n}.PaginatorAuthor.joined_offset'));
647 647
 	}
648 648
 
649 649
 /**
@@ -968,7 +968,7 @@ public function testPaginateOrderVirtualFieldSharedWithRealField() {
968 968
 		);
969 969
 		$Controller->passedArgs = array('sort' => 'PaginatorControllerPost.title', 'dir' => 'asc');
970 970
 		$result = $Controller->paginate('PaginatorControllerComment');
971  
-		$this->assertEquals(array(1, 2, 3, 4, 5, 6), Set::extract($result, '{n}.PaginatorControllerComment.id'));
  971
+		$this->assertEquals(array(1, 2, 3, 4, 5, 6), Hash::extract($result, '{n}.PaginatorControllerComment.id'));
972 972
 	}
973 973
 
974 974
 /**
6  lib/Cake/Test/Case/Controller/ControllerTest.php
@@ -104,7 +104,7 @@ public function beforeFind($query) {
104 104
 	public function find($type = 'first', $options = array()) {
105 105
 		if ($type == 'popular') {
106 106
 			$conditions = array($this->name . '.' . $this->primaryKey . ' > ' => '1');
107  
-			$options = Set::merge($options, compact('conditions'));
  107
+			$options = Hash::merge($options, compact('conditions'));
108 108
 			return parent::find('all', $options);
109 109
 		}
110 110
 		return parent::find($type, $options);
@@ -898,7 +898,7 @@ public function testMergeVars() {
898 898
 
899 899
 		$this->assertEquals(0, count(array_diff_key($TestController->helpers, array_flip($helpers))));
900 900
 		$this->assertEquals(0, count(array_diff($TestController->uses, $uses)));
901  
-		$this->assertEquals(count(array_diff_assoc(Set::normalize($TestController->components), Set::normalize($components))), 0);
  901
+		$this->assertEquals(count(array_diff_assoc(Hash::normalize($TestController->components), Hash::normalize($components))), 0);
902 902
 
903 903
 		$expected = array('ControllerComment', 'ControllerAlias', 'ControllerPost');
904 904
 		$this->assertEquals($expected, $TestController->uses, '$uses was merged incorrectly, ControllerTestAppController models should be last.');
@@ -1275,7 +1275,7 @@ public function testPaginateBackwardsCompatibility() {
1275 1275
 		$expected = array('page' => 1, 'limit' => 20, 'maxLimit' => 100, 'paramType' => 'named');
1276 1276
 		$this->assertEquals($expected, $Controller->paginate);
1277 1277
 
1278  
-		$results = Set::extract($Controller->paginate('ControllerPost'), '{n}.ControllerPost.id');
  1278
+		$results = Hash::extract($Controller->paginate('ControllerPost'), '{n}.ControllerPost.id');
1279 1279
 		$this->assertEquals(array(1, 2, 3), $results);
1280 1280
 
1281 1281
 		$Controller->passedArgs = array();
28  lib/Cake/Test/Case/Model/AclNodeTest.php
@@ -254,35 +254,33 @@ public function setUp() {
254 254
  */
255 255
 	public function testNode() {
256 256
 		$Aco = new DbAcoTest();
257  
-		$result = Set::extract($Aco->node('Controller1'), '{n}.DbAcoTest.id');
  257
+		$result = Hash::extract($Aco->node('Controller1'), '{n}.DbAcoTest.id');
258 258
 		$expected = array(2, 1);
259 259
 		$this->assertEquals($expected, $result);
260 260
 
261  
-		$result = Set::extract($Aco->node('Controller1/action1'), '{n}.DbAcoTest.id');
  261
+		$result = Hash::extract($Aco->node('Controller1/action1'), '{n}.DbAcoTest.id');
262 262
 		$expected = array(3, 2, 1);
263 263
 		$this->assertEquals($expected, $result);
264 264
 
265  
-		$result = Set::extract($Aco->node('Controller2/action1'), '{n}.DbAcoTest.id');
  265
+		$result = Hash::extract($Aco->node('Controller2/action1'), '{n}.DbAcoTest.id');
266 266
 		$expected = array(7, 6, 1);
267 267
 		$this->assertEquals($expected, $result);
268 268
 
269  
-		$result = Set::extract($Aco->node('Controller1/action2'), '{n}.DbAcoTest.id');
  269
+		$result = Hash::extract($Aco->node('Controller1/action2'), '{n}.DbAcoTest.id');
270 270
 		$expected = array(5, 2, 1);
271 271
 		$this->assertEquals($expected, $result);
272 272
 
273  
-		$result = Set::extract($Aco->node('Controller1/action1/record1'), '{n}.DbAcoTest.id');
  273
+		$result = Hash::extract($Aco->node('Controller1/action1/record1'), '{n}.DbAcoTest.id');
274 274
 		$expected = array(4, 3, 2, 1);
275 275
 		$this->assertEquals($expected, $result);
276 276
 
277  
-		$result = Set::extract($Aco->node('Controller2/action1/record1'), '{n}.DbAcoTest.id');
  277
+		$result = Hash::extract($Aco->node('Controller2/action1/record1'), '{n}.DbAcoTest.id');
278 278
 		$expected = array(8, 7, 6, 1);
279 279
 		$this->assertEquals($expected, $result);
280 280
 
281  
-		$result = Set::extract($Aco->node('Controller2/action3'), '{n}.DbAcoTest.id');
282  
-		$this->assertNull($result);
  281
+		$this->assertFalse($Aco->node('Controller2/action3'));
283 282
 
284  
-		$result = Set::extract($Aco->node('Controller2/action3/record5'), '{n}.DbAcoTest.id');
285  
-		$this->assertNull($result);
  283
+		$this->assertFalse($Aco->node('Controller2/action3/record5'));
286 284
 
287 285
 		$result = $Aco->node('');
288 286
 		$this->assertEquals(null, $result);
@@ -307,12 +305,12 @@ public function testNodeWithDuplicatePathSegments() {
307 305
 	public function testNodeArrayFind() {
308 306
 		$Aro = new DbAroTest();
309 307
 		Configure::write('DbAclbindMode', 'string');
310  
-		$result = Set::extract($Aro->node(array('DbAroUserTest' => array('id' => '1', 'foreign_key' => '1'))), '{n}.DbAroTest.id');
  308
+		$result = Hash::extract($Aro->node(array('DbAroUserTest' => array('id' => '1', 'foreign_key' => '1'))), '{n}.DbAroTest.id');
311 309
 		$expected = array(3, 2, 1);
312 310
 		$this->assertEquals($expected, $result);
313 311
 
314 312
 		Configure::write('DbAclbindMode', 'array');
315  
-		$result = Set::extract($Aro->node(array('DbAroUserTest' => array('id' => 4, 'foreign_key' => 2))), '{n}.DbAroTest.id');
  313
+		$result = Hash::extract($Aro->node(array('DbAroUserTest' => array('id' => 4, 'foreign_key' => 2))), '{n}.DbAroTest.id');
316 314
 		$expected = array(4);
317 315
 		$this->assertEquals($expected, $result);
318 316
 	}
@@ -326,12 +324,12 @@ public function testNodeObjectFind() {
326 324
 		$Aro = new DbAroTest();
327 325
 		$Model = new DbAroUserTest();
328 326
 		$Model->id = 1;
329  
-		$result = Set::extract($Aro->node($Model), '{n}.DbAroTest.id');
  327
+		$result = Hash::extract($Aro->node($Model), '{n}.DbAroTest.id');
330 328
 		$expected = array(3, 2, 1);
331 329
 		$this->assertEquals($expected, $result);
332 330
 
333 331
 		$Model->id = 2;
334  
-		$result = Set::extract($Aro->node($Model), '{n}.DbAroTest.id');
  332
+		$result = Hash::extract($Aro->node($Model), '{n}.DbAroTest.id');
335 333
 		$expected = array(4, 2, 1);
336 334
 		$this->assertEquals($expected, $result);
337 335
 	}
@@ -379,7 +377,7 @@ public function testNodeActionAuthorize() {
379 377
 		$this->assertEquals($expected, $result);
380 378
 
381 379
 		$node = $Aro->node(array('TestPlugin.TestPluginAuthUser' => array('id' => 1, 'user' => 'mariano')));
382  
-		$result = Set::extract($node, '0.DbAroTest.id');
  380
+		$result = Hash::get($node, '0.DbAroTest.id');
383 381
 		$expected = $Aro->id;
384 382
 		$this->assertEquals($expected, $result);
385 383
 		CakePlugin::unload('TestPlugin');
4  lib/Cake/Test/Case/Model/Behavior/TranslateBehaviorTest.php
@@ -631,8 +631,8 @@ public function testMixedCreateUpdateWithArrayLocale() {
631 631
 		$translations = array('title' => 'Title', 'content' => 'Content');
632 632
 		$TestModel->bindTranslation($translations, false);
633 633
 		$result = $TestModel->read(null, 1);
634  
-		$result['Title'] = Set::sort($result['Title'], '{n}.id', 'asc');
635  
-		$result['Content'] = Set::sort($result['Content'], '{n}.id', 'asc');
  634
+		$result['Title'] = Hash::sort($result['Title'], '{n}.id', 'asc');
  635
+		$result['Content'] = Hash::sort($result['Content'], '{n}.id', 'asc');
636 636
 		$expected = array(
637 637
 			'TranslatedItem' => array('id' => 1, 'slug' => 'first_translated', 'locale' => 'cze', 'title' => 'Titulek #1', 'content' => 'Upraveny obsah #1'),
638 638
 			'Title' => array(
12  lib/Cake/Test/Case/Model/BehaviorCollectionTest.php
@@ -102,7 +102,7 @@ public function afterFind(Model $model, $results, $primary) {
102 102
 				return null;
103 103
 			break;
104 104
 			case 'modify':
105  
-				return Set::extract($results, "{n}.{$model->alias}");
  105
+				return Hash::extract($results, "{n}.{$model->alias}");
106 106
 			break;
107 107
 		}
108 108
 	}
@@ -839,7 +839,7 @@ public function testBehaviorSaveCallbacks() {
839 839
 		$this->assertSame($expected, $result);
840 840
 
841 841
 		$Sample->Behaviors->attach('Test', array('beforeSave' => 'modify'));
842  
-		$expected = Set::insert($record, 'Sample.name', 'sample99 modified before');
  842
+		$expected = Hash::insert($record, 'Sample.name', 'sample99 modified before');
843 843
 		$Sample->create();
844 844
 		$result = $Sample->save($record);
845 845
 		$expected['Sample']['id'] = $Sample->id;
@@ -849,14 +849,14 @@ public function testBehaviorSaveCallbacks() {
849 849
 		$this->assertSame($record, $Sample->save($record));
850 850
 
851 851
 		$Sample->Behaviors->attach('Test', array('beforeSave' => 'off', 'afterSave' => 'on'));
852  
-		$expected = Set::merge($record, array('Sample' => array('aftersave' => 'modified after on create')));
  852
+		$expected = Hash::merge($record, array('Sample' => array('aftersave' => 'modified after on create')));
853 853
 		$Sample->create();
854 854
 		$result = $Sample->save($record);
855 855
 		$expected['Sample']['id'] = $Sample->id;
856 856
 		$this->assertEquals($expected, $result);
857 857
 
858 858
 		$Sample->Behaviors->attach('Test', array('beforeSave' => 'modify', 'afterSave' => 'modify'));
859  
-		$expected = Set::merge($record, array('Sample' => array('name' => 'sample99 modified before modified after on create')));
  859
+		$expected = Hash::merge($record, array('Sample' => array('name' => 'sample99 modified before modified after on create')));
860 860
 		$Sample->create();
861 861
 		$result = $Sample->save($record);
862 862
 		$expected['Sample']['id'] = $Sample->id;
@@ -881,12 +881,12 @@ public function testBehaviorSaveCallbacks() {
881 881
 		$record2 = $Sample->read(null, 1);
882 882
 
883 883
 		$Sample->Behaviors->attach('Test', array('afterSave' => 'on'));
884  
-		$expected = Set::merge($record2, array('Sample' => array('aftersave' => 'modified after')));
  884
+		$expected = Hash::merge($record2, array('Sample' => array('aftersave' => 'modified after')));
885 885
 		$Sample->create();
886 886
 		$this->assertSame($expected, $Sample->save($record2));
887 887
 
888 888
 		$Sample->Behaviors->attach('Test', array('afterSave' => 'modify'));
889  
-		$expected = Set::merge($record2, array('Sample' => array('name' => 'sample1 modified after')));
  889
+		$expected = Hash::merge($record2, array('Sample' => array('name' => 'sample1 modified after')));
890 890
 		$Sample->create();
891 891
 		$this->assertSame($expected, $Sample->save($record2));
892 892
 	}
18  lib/Cake/Test/Case/Model/ModelReadTest.php
@@ -3015,7 +3015,7 @@ public function testFindThreadedNoParent() {
3015 3015
 		$this->loadFixtures('Apple', 'Sample');
3016 3016
 		$Apple = new Apple();
3017 3017
 		$result = $Apple->find('threaded');
3018  
-		$result = Set::extract($result, '{n}.children');
  3018
+		$result = Hash::extract($result, '{n}.children');
3019 3019
 		$expected = array(array(), array(), array(), array(), array(), array(),	array());
3020 3020
 		$this->assertEquals($expected, $result);
3021 3021
 	}
@@ -3030,7 +3030,7 @@ public function testFindThreaded() {
3030 3030
 		$Model = new Person();
3031 3031
 		$Model->recursive = -1;
3032 3032
 		$result = $Model->find('threaded');
3033  
-		$result = Set::extract($result, '{n}.children');
  3033
+		$result = Hash::extract($result, '{n}.children');
3034 3034
 		$expected = array(array(), array(), array(), array(), array(), array(),	array());
3035 3035
 		$this->assertEquals($expected, $result);
3036 3036
 
@@ -6479,7 +6479,7 @@ public function testGenerateFindList() {
6479 6479
 			$this->assertEquals($expected, $result);
6480 6480
 		}
6481 6481
 
6482  
-		$result = Set::combine(
  6482
+		$result = Hash::combine(
6483 6483
 			$TestModel->find('all', array(
6484 6484
 				'order' => 'Article.title ASC',
6485 6485
 				'fields' => array('id', 'title')
@@ -6493,7 +6493,7 @@ public function testGenerateFindList() {
6493 6493
 		);
6494 6494
 		$this->assertEquals($expected, $result);
6495 6495
 
6496  
-		$result = Set::combine(
  6496
+		$result = Hash::combine(
6497 6497
 			$TestModel->find('all', array(
6498 6498
 				'order' => 'Article.title ASC'
6499 6499
 			)),
@@ -6530,7 +6530,7 @@ public function testGenerateFindList() {
6530 6530
 
6531 6531
 		$this->assertEquals($expected, $result);
6532 6532
 
6533  
-		$result = Set::combine(
  6533
+		$result = Hash::combine(
6534 6534
 			$TestModel->find('all', array(
6535 6535
 				'order' => 'Article.title ASC'
6536 6536
 			)),
@@ -6569,7 +6569,7 @@ public function testGenerateFindList() {
6569 6569
 
6570 6570
 		$this->assertEquals($expected, $result);
6571 6571
 
6572  
-		$result = Set::combine(
  6572
+		$result = Hash::combine(
6573 6573
 			$TestModel->find('all', array(
6574 6574
 				'order' => 'Article.title ASC',
6575 6575
 				'fields' => array('id', 'title', 'user_id')
@@ -7689,17 +7689,17 @@ public function testVirtualFieldsOrder() {
7689 7689
 
7690 7690
 		$Post->Author->virtualFields = array('joined' => 'Post.id * Author.id');
7691 7691
 		$result = $Post->find('all');
7692  
-		$result = Set::extract('{n}.Author.joined', $result);
  7692
+		$result = Hash::extract($result, '{n}.Author.joined');
7693 7693
 		$expected = array(1, 6, 3);
7694 7694
 		$this->assertEquals($expected, $result);
7695 7695
 
7696 7696
 		$result = $Post->find('all', array('order' => array('Author.joined' => 'ASC')));
7697  
-		$result = Set::extract('{n}.Author.joined', $result);
  7697
+		$result = Hash::extract($result, '{n}.Author.joined');
7698 7698
 		$expected = array(1, 3, 6);
7699 7699
 		$this->assertEquals($expected, $result);
7700 7700
 
7701 7701
 		$result = $Post->find('all', array('order' => array('Author.joined' => 'DESC')));
7702  
-		$result = Set::extract('{n}.Author.joined', $result);
  7702
+		$result = Hash::extract($result, '{n}.Author.joined');
7703 7703
 		$expected = array(6, 3, 1);
7704 7704
 		$this->assertEquals($expected, $result);
7705 7705
 	}
20  lib/Cake/Test/Case/Model/ModelWriteTest.php
@@ -411,7 +411,7 @@ public function testCounterCacheWithSelfJoin() {
411 411
 		$Category = new CategoryThread();
412 412
 		$Category->belongsTo['ParentCategory']['counterCache'] = 'child_count';
413 413
 		$Category->updateCounterCache(array('parent_id' => 5));
414  
-		$result = Set::extract($Category->find('all', array('conditions' => array('CategoryThread.id' => 5))), '{n}.CategoryThread.child_count');
  414
+		$result = Hash::extract($Category->find('all', array('conditions' => array('CategoryThread.id' => 5))), '{n}.CategoryThread.child_count');
415 415
 		$expected = array(1);
416 416
 		$this->assertEquals($expected, $result);
417 417
 	}
@@ -1680,7 +1680,7 @@ public function testSaveHabtmNoPrimaryData() {
1680 1680
 		$TestModel->id = 2;
1681 1681
 		$TestModel->save($data);
1682 1682
 		$result = $TestModel->findById(2);
1683  
-		$result['Item'] = Set::sort($result['Item'], '{n}.id', 'asc');