AutoConfigObj.php 684 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. <?php declare(strict_types=1);
  2. /**
  3. * This file is part of toolkit/stdlib.
  4. *
  5. * @author https://github.com/inhere
  6. * @link https://github.com/php-toolkit/stdlib
  7. * @license MIT
  8. */
  9. namespace Toolkit\StdlibTest\Cases;
  10. use Toolkit\Stdlib\Obj\Traits\AutoConfigTrait;
  11. /**
  12. * class AutoConfigObj
  13. *
  14. * @author inhere
  15. */
  16. class AutoConfigObj
  17. {
  18. use AutoConfigTrait;
  19. public int $age = 0;
  20. private string $name = '';
  21. /**
  22. * @param string $name
  23. */
  24. public function setName(string $name): void
  25. {
  26. $this->name = $name;
  27. }
  28. /**
  29. * @return string
  30. */
  31. public function getName(): string
  32. {
  33. return $this->name;
  34. }
  35. }