|
|
@@ -16,6 +16,7 @@ use Cake\Cache\Cache;
|
|
|
use Cake\Core\Configure;
|
|
|
use Cake\I18n\I18n;
|
|
|
use Cake\Utility\Debugger;
|
|
|
+use Cake\Collection\Collection;
|
|
|
|
|
|
/**
|
|
|
* Basic defines for timing functions.
|
|
|
@@ -461,3 +462,17 @@ if (!function_exists('__x')) {
|
|
|
}
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+if (!function_exists('collection')) {
|
|
|
+
|
|
|
+/**
|
|
|
+ * Returns a new Cake\Collection\Collection object wrapping the passed argument
|
|
|
+ *
|
|
|
+ * @param \Traversable|array $items
|
|
|
+ * @return \Cake\Collection\Collection
|
|
|
+ */
|
|
|
+ function collection($items) {
|
|
|
+ return new Collection($items);
|
|
|
+ }
|
|
|
+
|
|
|
+}
|