3
* Function for handling Classes in PHP 4.
5
* Note: in PHP 5, another file should be included. It shoudl handle clone for example.
7
* This file is part of the evoCore framework - {@link http://evocore.net/}
8
* See also {@link http://sourceforge.net/projects/evocms/}.
10
* @copyright (c)2003-2007 by Francois PLANQUE - {@link http://fplanque.net/}
12
* {@internal License choice
13
* - If you have received this file as part of a package, please find the license.txt file in
14
* the same folder or the closest folder above for complete license terms.
15
* - If you have received this file individually (e-g: from http://evocms.cvs.sourceforge.net/)
16
* then you must choose one of the following licenses before using the file:
17
* - GNU General Public License 2 (GPL) - http://www.opensource.org/licenses/gpl-license.php
18
* - Mozilla Public License 1.1 (MPL) - http://www.opensource.org/licenses/mozilla1.1.php
23
* @author fplanque: Francois PLANQUE
25
* @version $Id: _class4.funcs.php,v 1.1 2007/06/25 10:58:52 fplanque Exp $
27
if( !defined('EVO_MAIN_INIT') ) die( 'Please, do not access this page directly.' );
33
function load_class( $class_path, $require = true )
36
if( ! $require && ! file_exists( $inc_path.$class_path ) )
40
require_once $inc_path.$class_path;
48
function load_funcs( $funcs_path )
51
require_once $inc_path.$funcs_path;
56
* @todo fp> split into 1 function per case. (typed @return values)
58
* @return DataObjectCache
60
function & get_Cache( $objectName )
65
if( isset( $$objectName ) )
66
{ // Cache already exists:
73
load_class( 'collections/model/_blogcache.class.php' );
74
$BlogCache = new BlogCache(); // COPY (FUNC)
78
load_class( 'chapters/model/_chaptercache.class.php' );
79
$ChapterCache = new ChapterCache(); // COPY (FUNC)
83
load_class( 'files/model/_filecache.class.php' );
84
$FileCache = new FileCache(); // COPY (FUNC)
88
load_class( 'files/model/_filerootcache.class.php' );
89
$Plugins->get_object_from_cacheplugin_or_create( 'FileRootCache' );
90
return $FileRootCache;
93
load_class( 'files/model/_filetypecache.class.php' );
94
$Plugins->get_object_from_cacheplugin_or_create( 'FiletypeCache' );
95
return $FiletypeCache;
98
$Plugins->get_object_from_cacheplugin_or_create( 'GroupCache', 'new DataObjectCache( \'Group\', true, \'T_groups\', \'grp_\', \'grp_ID\', \'grp_name\', \'\', T_(\'No group\') )' );
101
case 'ItemCacheLight';
102
$ItemCacheLight = new DataObjectCache( 'ItemLight', false, 'T_items__item', 'post_', 'post_ID' ); // COPY (FUNC)
103
return $ItemCacheLight;
106
load_class( 'items/model/_itemcache.class.php' );
107
$ItemCache = new ItemCache(); // COPY (FUNC)
110
case 'ItemStatusCache':
111
$Plugins->get_object_from_cacheplugin_or_create( 'ItemStatusCache', 'new GenericCache( \'GenericElement\', true, \'T_items__status\', \'pst_\', \'pst_ID\', NULL, \'\', T_(\'No status\') )' );
112
return $ItemStatusCache;
114
case 'ItemTypeCache':
115
load_class( 'items/model/_itemtypecache.class.php' );
116
$Plugins->get_object_from_cacheplugin_or_create( 'ItemTypeCache', 'new ItemTypeCache( \'ptyp_\', \'ptyp_ID\' )' );
117
return $ItemTypeCache;
120
load_class( 'items/model/_linkcache.class.php' );
121
$LinkCache = new LinkCache(); // COPY (FUNC)
124
case 'Plugins_admin':
125
load_class('plugins/model/_plugins_admin.class.php');
126
$Plugins_admin = new Plugins_admin(); // COPY (FUNC)
127
return $Plugins_admin;
130
load_class( 'skins/model/_skincache.class.php' );
131
$SkinCache = new SkinCache(); // COPY (FUNC)
135
load_class( 'users/model/_usercache.class.php' );
136
$UserCache = new UserCache(); // COPY (FUNC)
140
load_class( 'widgets/model/_widgetcache.class.php' );
141
$WidgetCache = new WidgetCache(); // COPY (FUNC)
145
debug_die( 'getCache(): Unknown Cache type:'.$objectName );
150
* $Log: _class4.funcs.php,v $
151
* Revision 1.1 2007/06/25 10:58:52 fplanque
152
* MODULES (refactored MVC)
154
* Revision 1.19 2007/06/20 14:25:00 fplanque
157
* Revision 1.18 2007/06/18 21:25:48 fplanque
158
* one class per core widget
160
* Revision 1.17 2007/05/14 02:43:05 fplanque
161
* Started renaming tables. There probably won't be a better time than 2.0.
163
* Revision 1.16 2007/04/26 00:11:07 fplanque
166
* Revision 1.15 2007/03/18 03:43:19 fplanque
168
* Splitting Item/ItemLight and ItemList/ItemListLight
169
* Goal: Handle Items with less footprint than with their full content
170
* (will be even worse with multiple languages/revisions per Item)
172
* Revision 1.14 2007/01/11 20:44:19 fplanque
173
* skin containers proof of concept
174
* (no params handling yet though)
176
* Revision 1.13 2007/01/11 02:57:25 fplanque
177
* implemented removing widgets from containers
179
* Revision 1.12 2006/12/29 01:10:06 fplanque
180
* basic skin registering
182
* Revision 1.11 2006/12/07 20:03:32 fplanque
183
* Woohoo! File editing... means all skin editing.
185
* Revision 1.10 2006/12/05 01:35:27 blueyed
186
* Hooray for less complexity and the 8th param for DataObjectCache()
188
* Revision 1.9 2006/12/05 00:59:46 fplanque
191
* Revision 1.8 2006/12/05 00:34:39 blueyed
192
* Implemented custom "None" option text in DataObjectCache; Added for $ItemStatusCache, $GroupCache, UserCache and BlogCache; Added custom text for Item::priority_options()
194
* Revision 1.7 2006/12/01 20:55:45 blueyed
195
* Fixed load_Class() for $Plugins_admin
197
* Revision 1.6 2006/12/01 02:01:38 blueyed
198
* Added "Plugins_admin" to get_Cache() + doc
200
* Revision 1.5 2006/11/30 22:34:15 fplanque
203
* Revision 1.4 2006/11/24 18:27:27 blueyed
204
* Fixed link to b2evo CVS browsing interface in file docblocks
b'\\ No newline at end of file'