summaryrefslogtreecommitdiff
path: root/tests/simple_unit/ActiveRecord/records/ItemRecord.php
diff options
context:
space:
mode:
Diffstat (limited to 'tests/simple_unit/ActiveRecord/records/ItemRecord.php')
-rw-r--r--tests/simple_unit/ActiveRecord/records/ItemRecord.php96
1 files changed, 48 insertions, 48 deletions
diff --git a/tests/simple_unit/ActiveRecord/records/ItemRecord.php b/tests/simple_unit/ActiveRecord/records/ItemRecord.php
index 52a1a658..8585ebaf 100644
--- a/tests/simple_unit/ActiveRecord/records/ItemRecord.php
+++ b/tests/simple_unit/ActiveRecord/records/ItemRecord.php
@@ -1,49 +1,49 @@
-<?php
-
-class ItemRecord extends TActiveRecord
-{
- const TABLE='items';
- public $item_id;
- public $name;
- public $brand_specific;
- public $description;
- public $meta;
- public $active;
- public $need_review;
- public $category_id;
- public $type_id;
- public $content;
- public $standard_id;
- public $timestamp;
-
- public $related_items = array();
- public $related_item_id;
-
- public static $RELATIONS=array
- (
- 'related_items' => array(self::MANY_TO_MANY, 'ItemRecord', 'related_items.related_item_id'),
- );
-
- public function getDbConnection()
- {
- static $conn;
- if($conn===null)
- {
- $conn = new TDbConnection('pgsql:host=localhost;dbname=test', 'test','test');
- $this->OnExecuteCommand[] = array($this,'logger');
- }
- return $conn;
- }
-
- public function logger($sender,$param)
- {
- //var_dump($param->Command->Text);
- }
-
- public static function finder($className=__CLASS__)
- {
- return parent::finder($className);
- }
-}
-
+<?php
+
+class ItemRecord extends TActiveRecord
+{
+ const TABLE='items';
+ public $item_id;
+ public $name;
+ public $brand_specific;
+ public $description;
+ public $meta;
+ public $active;
+ public $need_review;
+ public $category_id;
+ public $type_id;
+ public $content;
+ public $standard_id;
+ public $timestamp;
+
+ public $related_items = array();
+ public $related_item_id;
+
+ public static $RELATIONS=array
+ (
+ 'related_items' => array(self::MANY_TO_MANY, 'ItemRecord', 'related_items.related_item_id'),
+ );
+
+ public function getDbConnection()
+ {
+ static $conn;
+ if($conn===null)
+ {
+ $conn = new TDbConnection('pgsql:host=localhost;dbname=test', 'test','test');
+ $this->OnExecuteCommand[] = array($this,'logger');
+ }
+ return $conn;
+ }
+
+ public function logger($sender,$param)
+ {
+ //var_dump($param->Command->Text);
+ }
+
+ public static function finder($className=__CLASS__)
+ {
+ return parent::finder($className);
+ }
+}
+
?> \ No newline at end of file