File tree Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Expand file tree Collapse file tree 1 file changed +56
-0
lines changed Original file line number Diff line number Diff line change
1
+ <?php
2
+ /**
3
+ * CCollect provides a wrapper for working with arrays of data
4
+ *
5
+ * @project ApPHP Framework
6
+ * @author ApPHP <[email protected] >
7
+ * @link http://www.apphpframework.com/
8
+ * @copyright Copyright (c) 2012 - 2020 ApPHP Framework
9
+ * @license http://www.apphpframework.com/license/
10
+ *
11
+ * PUBLIC: PROTECTED: PRIVATE:
12
+ * ---------- ---------- ----------
13
+ * __construct
14
+ *
15
+ * init (static)
16
+ * all
17
+ *
18
+ */
19
+
20
+ class CCollection extends CComponent
21
+ {
22
+
23
+ /**
24
+ * The items contained in the collection
25
+ * @var array
26
+ */
27
+ protected $ _items = [];
28
+
29
+ /**
30
+ * Class default constructor
31
+ */
32
+ function __construct ()
33
+ {
34
+
35
+ }
36
+
37
+ /**
38
+ * Returns the instance of object
39
+ * @return current class
40
+ */
41
+ public static function init ()
42
+ {
43
+ return parent ::init (__CLASS__ );
44
+ }
45
+
46
+ /**
47
+ * Get all of the items in the collection
48
+ *
49
+ * @return array
50
+ */
51
+ public function all ()
52
+ {
53
+ return $ this ->_items ;
54
+ }
55
+
56
+ }
You can’t perform that action at this time.
0 commit comments