BxBaseServices.php 1.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  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. * System services.
  11. */
  12. class BxBaseServices extends BxDol implements iBxDolProfileService {
  13. public function __construct() {
  14. parent::__construct();
  15. }
  16. public function serviceProfileUnit ($iContentId) {
  17. if (!$iContentId)
  18. return false;
  19. if (!($oAccount = BxDolAccount::getInstance($iContentId)))
  20. return false;
  21. return $oAccount->getUnit();
  22. }
  23. public function serviceProfileThumb ($iContentId) {
  24. if (!$iContentId)
  25. return false;
  26. if (!($oAccount = BxDolAccount::getInstance($iContentId)))
  27. return false;
  28. return $oAccount->getThumb();
  29. }
  30. public function serviceProfileName ($iContentId) {
  31. if (!$iContentId)
  32. return false;
  33. if (!($oAccount = BxDolAccount::getInstance($iContentId)))
  34. return false;
  35. return $oAccount->getDisplayName();
  36. }
  37. public function serviceProfileUrl ($iContentId) {
  38. if (!$iContentId)
  39. return false;
  40. if (!($oAccount = BxDolAccount::getInstance($iContentId)))
  41. return false;
  42. return $oAccount->getUrl();
  43. }
  44. }
  45. /** @} */