Base.php 772 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. <?php
  2. declare(strict_types=1);
  3. namespace PhpMyAdmin\Server\SysInfo;
  4. use const PHP_OS;
  5. /**
  6. * Basic SysInfo class not providing any real data.
  7. */
  8. class Base
  9. {
  10. /**
  11. * The OS name
  12. *
  13. * @var string
  14. */
  15. public $os = PHP_OS;
  16. /**
  17. * Gets load information
  18. *
  19. * @return array with load data
  20. */
  21. public function loadavg()
  22. {
  23. return ['loadavg' => 0];
  24. }
  25. /**
  26. * Gets information about memory usage
  27. *
  28. * @return array with memory usage data
  29. */
  30. public function memory()
  31. {
  32. return [];
  33. }
  34. /**
  35. * Checks whether class is supported in this environment
  36. *
  37. * @return bool true on success
  38. */
  39. public function supported()
  40. {
  41. return true;
  42. }
  43. }