Friendica Communications Platform (please note that this is a clone of the repository at github, issues are handled there) https://friendi.ca
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

48 lines
586 B

  1. <?php
  2. /**
  3. * @file src/Core/BaseObject.php
  4. */
  5. namespace Friendica\Core;
  6. if (class_exists('BaseObject')) {
  7. return;
  8. }
  9. require_once 'boot.php';
  10. /**
  11. * Basic object
  12. *
  13. * Contains what is useful to any object
  14. */
  15. class BaseObject
  16. {
  17. private static $app = null;
  18. /**
  19. * Get the app
  20. *
  21. * Same as get_app from boot.php
  22. */
  23. public function get_app()
  24. {
  25. if (self::$app) {
  26. return self::$app;
  27. }
  28. self::$app = boot::get_app();
  29. return self::$app;
  30. }
  31. /**
  32. * Set the app
  33. *
  34. * @param object $app App
  35. */
  36. public static function set_app($app)
  37. {
  38. self::$app = $app;
  39. }
  40. }