summaryrefslogtreecommitdiff
path: root/tests/simple_unit/ActiveRecord/records/UserRecord.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/simple_unit/ActiveRecord/records/UserRecord.php')
-rw-r--r--tests/simple_unit/ActiveRecord/records/UserRecord.php39
1 files changed, 39 insertions, 0 deletions
diff --git a/tests/simple_unit/ActiveRecord/records/UserRecord.php b/tests/simple_unit/ActiveRecord/records/UserRecord.php
new file mode 100644
index 00000000..45b74d3a
--- /dev/null
+++ b/tests/simple_unit/ActiveRecord/records/UserRecord.php
@@ -0,0 +1,39 @@
+<?php
+
+class UserRecord extends TActiveRecord
+{
+ public $username;
+ public $password;
+ public $email;
+ public $first_name;
+ public $last_name;
+ public $job_title;
+ public $work_phone;
+ public $work_fax;
+ public $active=true;
+ public $department_id;
+ public $salutation;
+ public $hint_question;
+ public $hint_answer;
+
+ private $_level=-1;
+
+ protected static $_tablename='users';
+
+ public function getLevel()
+ {
+ return $this->_level;
+ }
+
+ public function setLevel($level)
+ {
+ $this->_level=TPropertyValue::ensureInteger($level);
+ }
+
+ public static function finder()
+ {
+ return self::getRecordFinder('UserRecord');
+ }
+}
+
+?> \ No newline at end of file