BxBaseServiceMobileApps.php 765 B

123456789101112131415161718192021222324252627282930313233
  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 UnaBaseView UNA Base Representation Classes
  7. * @{
  8. */
  9. /**
  10. * System services for mobile apps.
  11. */
  12. class BxBaseServiceMobileApps extends BxDol
  13. {
  14. public function __construct()
  15. {
  16. parent::__construct();
  17. }
  18. /**
  19. * Get injection code required for mobile apps
  20. * @return string with Styles and JS code
  21. */
  22. public function serviceInjection()
  23. {
  24. if (false === strpos($_SERVER['HTTP_USER_AGENT'], 'UNAMobileApp'))
  25. return '';
  26. return BxDolTemplate::getInstance()->parseHtmlByName('mobile_apps_styles.html', array());
  27. }
  28. }
  29. /** @} */