BxDolModuleDb.php 782 B

12345678910111213141516171819202122232425262728293031323334353637
  1. <?php defined('BX_DOL') or die('hack attempt');
  2. /**
  3. * Copyright (c) UNA, Inc - https://una.io
  4. * MIT License - https://opensource.org/licenses/MIT
  5. *
  6. * @defgroup UnaCore UNA Core
  7. * @{
  8. */
  9. /**
  10. * Base class for all modules DB classes
  11. */
  12. class BxDolModuleDb extends BxDolModuleQuery
  13. {
  14. protected $_sPrefix;
  15. /**
  16. * Constructor
  17. */
  18. public function __construct($oConfig)
  19. {
  20. parent::__construct();
  21. if (is_a($oConfig,'BxDolModuleConfig'))
  22. $this->_sPrefix = $oConfig->getDbPrefix();
  23. else
  24. trigger_error ('It is impossible to create BxDolModuleDb class instance without prefix: ' . get_class($this), E_USER_ERROR);
  25. }
  26. public function getPrefix()
  27. {
  28. return $this->_sPrefix;
  29. }
  30. }
  31. /** @} */