1 <?php
2 /**
3 * @package Joomla.Legacy
4 * @subpackage Model
5 *
6 * @copyright Copyright (C) 2005 - 2017 Open Source Matters, Inc. All rights reserved.
7 * @license GNU General Public License version 2 or later; see LICENSE.txt
8 */
9
10 defined('JPATH_PLATFORM') or die;
11
12 /**
13 * Prototype item model.
14 *
15 * @since 1.6
16 */
17 abstract class JModelItem extends JModelLegacy
18 {
19 /**
20 * An item.
21 *
22 * @var array
23 * @since 1.6
24 */
25 protected $_item = null;
26
27 /**
28 * Model context string.
29 *
30 * @var string
31 * @since 1.6
32 */
33 protected $_context = 'group.type';
34
35 /**
36 * Method to get a store id based on model configuration state.
37 *
38 * This is necessary because the model is used by the component and
39 * different modules that might need different sets of data or different
40 * ordering requirements.
41 *
42 * @param string $id A prefix for the store id.
43 *
44 * @return string A store id.
45 *
46 * @since 1.6
47 */
48 protected function getStoreId($id = '')
49 {
50 // Compile the store id.
51 return md5($id);
52 }
53 }
54