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.
 
 
 
 
 
 

44 lines
540 B

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