1
0

BxDolModuleDb.php 799 B

123456789101112131415161718192021222324252627282930313233343536
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) BoonEx Pty Limited - http://www.boonex.com/
  4. * CC-BY License - http://creativecommons.org/licenses/by/3.0/
  5. *
  6. * @defgroup DolphinCore Dolphin Core
  7. * @{
  8. */
  9. /**
  10. * Base class for all modules DB classes
  11. */
  12. class BxDolModuleDb extends BxDolModuleQuery {
  13. protected $_sPrefix;
  14. /**
  15. * Constructor
  16. */
  17. public function __construct($oConfig) {
  18. parent::__construct();
  19. if (is_a($oConfig,'BxDolModuleConfig'))
  20. $this->_sPrefix = $oConfig->getDbPrefix();
  21. else
  22. trigger_error ('It is impossible to create BxDolModuleDb class instance without prefix: ' . get_class($this), E_USER_ERROR);
  23. }
  24. public function getPrefix() {
  25. return $this->_sPrefix;
  26. }
  27. }
  28. /** @} */