1234567891011121314151617181920212223242526272829303132333435363738394041424344 |
- <?php
-
- namespace App\Dbo;
-
- use Luticate\Utils\Dbo\LuDbo;
- use Luticate\Utils\Dbo\LuDboConstraintException;
- use Luticate\Utils\Dbo\LuStringDbo;
-
- /**
- * Created by PhpStorm.
- * User: robin
- * Date: 6/6/16
- * Time: 4:47 PM
- */
- class TestDbo extends LuDbo
- {
- /**
- * @var $_testField string
- */
- private $_testField;
-
- /**
- * @return string
- */
- public function getTestField()
- {
- return $this->_testField;
- }
-
- /**
- * @param string $testField
- */
- public function setTestField($testField)
- {
- $this->_testField = $testField;
- }
-
- public function check()
- {
- if (is_null($this->_testField) || empty($this->_testField)) {
- throw new LuDboConstraintException("TestField can not be null or empty");
- }
- }
- }
|