選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。

TestDbo.php 799B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. namespace App\Dbo;
  3. use Luticate\Utils\Dbo\LuDbo;
  4. use Luticate\Utils\Dbo\LuDboConstraintException;
  5. use Luticate\Utils\Dbo\LuStringDbo;
  6. /**
  7. * Created by PhpStorm.
  8. * User: robin
  9. * Date: 6/6/16
  10. * Time: 4:47 PM
  11. */
  12. class TestDbo extends LuDbo
  13. {
  14. /**
  15. * @var $_testField string
  16. */
  17. private $_testField;
  18. /**
  19. * @return string
  20. */
  21. public function getTestField()
  22. {
  23. return $this->_testField;
  24. }
  25. /**
  26. * @param string $testField
  27. */
  28. public function setTestField($testField)
  29. {
  30. $this->_testField = $testField;
  31. }
  32. public function check()
  33. {
  34. if (is_null($this->_testField) || empty($this->_testField)) {
  35. throw new LuDboConstraintException("TestField can not be null or empty");
  36. }
  37. }
  38. }