PageRenderTime 38ms CodeModel.GetById 15ms RepoModel.GetById 0ms app.codeStats 0ms

/libraries/joomla/application/component/modelitem.php

https://bitbucket.org/izubizarreta/https-bitbucket.org-bityvip
PHP | 56 lines | 12 code | 5 blank | 39 comment | 0 complexity | df900c3d020abb54cf39392822c7bb05 MD5 | raw file
Possible License(s): LGPL-3.0, LGPL-2.0, JSON, GPL-2.0, BSD-3-Clause, LGPL-2.1, MIT
  1. <?php
  2. /**
  3. * @package Joomla.Platform
  4. * @subpackage Application
  5. *
  6. * @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
  7. * @license GNU General Public License version 2 or later; see LICENSE
  8. */
  9. defined('JPATH_PLATFORM') or die;
  10. jimport('joomla.application.component.model');
  11. /**
  12. * Prototype item model.
  13. *
  14. * @package Joomla.Platform
  15. * @subpackage Application
  16. * @since 11.1
  17. */
  18. abstract class JModelItem extends JModel
  19. {
  20. /**
  21. * An item.
  22. *
  23. * @var array
  24. */
  25. protected $_item = null;
  26. /**
  27. * Model context string.
  28. *
  29. * @var string
  30. * @since 11.1
  31. */
  32. protected $_context = 'group.type';
  33. /**
  34. * Method to get a store id based on model configuration state.
  35. *
  36. * This is necessary because the model is used by the component and
  37. * different modules that might need different sets of data or different
  38. * ordering requirements.
  39. *
  40. * @param string $id A prefix for the store id.
  41. *
  42. * @return string A store id.
  43. *
  44. * @since 11.1
  45. */
  46. protected function getStoreId($id = '')
  47. {
  48. // Compile the store id.
  49. return md5($id);
  50. }
  51. }