1 | <?php |
||
4 | class OneCallObjectCacher extends Object |
||
5 | { |
||
6 | |||
7 | /** |
||
8 | * |
||
9 | * @var array |
||
10 | */ |
||
11 | private static $_object_store = array(); |
||
12 | |||
13 | /** |
||
14 | * |
||
15 | * @var array |
||
16 | */ |
||
17 | private static $_reference_to_full_key = array(); |
||
18 | |||
19 | |||
20 | public static function get_one($callerClass, $filter = "", $cache = true, $orderby = "") |
||
23 | |||
24 | /** |
||
25 | * |
||
26 | * @var array |
||
27 | */ |
||
28 | private static $_list_cache = array(); |
||
29 | |||
30 | |||
31 | public static function clear_all() |
||
37 | |||
38 | |||
39 | public static function clear_objects() |
||
44 | |||
45 | public static function clear_lists() |
||
49 | |||
50 | |||
51 | /** |
||
52 | * stores any dataobject |
||
53 | * @param DataObject |
||
54 | * |
||
55 | * @return DataObject |
||
56 | */ |
||
57 | public static function store_object($object, $key = null) |
||
66 | |||
67 | /** |
||
68 | * stores any dataobject |
||
69 | * @param string $key |
||
70 | * @param string $className (optional) |
||
71 | * @param int $id (optional) |
||
72 | * |
||
73 | * @return DataObject |
||
74 | */ |
||
75 | public static function retrieve_object($key, $className = '', $id = 0) |
||
88 | |||
89 | /** |
||
90 | * clears all the references to one object... |
||
91 | * returns true if found and false it not found ... |
||
92 | * |
||
93 | * @param string $className |
||
94 | * @param int $id |
||
95 | * |
||
96 | * @return bool |
||
97 | */ |
||
98 | public static function clear_one_object($className, $id) |
||
113 | |||
114 | /** |
||
115 | * return a data list |
||
116 | * @param SS_List |
||
117 | * @param string $key |
||
118 | * |
||
119 | * @return SS_List |
||
120 | */ |
||
121 | public static function store_list($dataList, $key) |
||
127 | |||
128 | /** |
||
129 | * |
||
130 | * @param string $key |
||
131 | * |
||
132 | * @return array |
||
133 | */ |
||
134 | public static function retrieve_list($key) |
||
138 | } |
||
139 |
This check looks from parameters that have been defined for a function or method, but which are not used in the method body.