TestModel.php 306 B

123456789101112131415161718192021
  1. <?php
  2. namespace custom\model;
  3. use n2n\context\attribute\ThreadScoped;
  4. use n2n\context\attribute\SessionScoped;
  5. #[ThreadScoped]
  6. class TestModel {
  7. #[SessionScoped]
  8. private ?string $test = null;
  9. function getTest() {
  10. return $this->test;
  11. }
  12. function setTest(string $str) {
  13. $this->test = $str;
  14. }
  15. }