summaryrefslogtreecommitdiff
path: root/framework/Data/ActiveRecord/Relations
diff options
context:
space:
mode:
authorxue <>2007-09-29 22:07:12 +0000
committerxue <>2007-09-29 22:07:12 +0000
commit54e9feab491bcf8d1a95b486b68605cb4441e603 (patch)
treebffc84037861293872f5db616345888ffbd0e453 /framework/Data/ActiveRecord/Relations
parent109ff4ee3bec41d95a122c6a69ad204c5dcfe099 (diff)
Changed RELATIONS declaration.
Diffstat (limited to 'framework/Data/ActiveRecord/Relations')
-rw-r--r--framework/Data/ActiveRecord/Relations/TActiveRecordBelongsTo.php2
-rw-r--r--framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php2
-rw-r--r--framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php4
-rw-r--r--framework/Data/ActiveRecord/Relations/TActiveRecordHasOne.php2
-rw-r--r--framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php6
5 files changed, 6 insertions, 10 deletions
diff --git a/framework/Data/ActiveRecord/Relations/TActiveRecordBelongsTo.php b/framework/Data/ActiveRecord/Relations/TActiveRecordBelongsTo.php
index 02d0b0e3..5d20476c 100644
--- a/framework/Data/ActiveRecord/Relations/TActiveRecordBelongsTo.php
+++ b/framework/Data/ActiveRecord/Relations/TActiveRecordBelongsTo.php
@@ -39,7 +39,7 @@ Prado::using('System.Data.ActiveRecord.Relations.TActiveRecordRelation');
* public $age;
* public $team; //foreign object TeamRecord
*
- * protected static $RELATIONS = array
+ * public static $RELATIONS = array
* (
* 'team' => array(self::BELONGS_TO, 'TeamRecord')
* );
diff --git a/framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php b/framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php
index 5c180c12..fea78e36 100644
--- a/framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php
+++ b/framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php
@@ -34,7 +34,7 @@ Prado::using('System.Data.ActiveRecord.Relations.TActiveRecordRelation');
*
* public $players=array(); //list of players
*
- * protected static $RELATIONS=array
+ * public static $RELATIONS=array
* (
* 'players' => array(self::HAS_MANY, 'PlayerRecord')
* );
diff --git a/framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php b/framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php
index 65989639..7e942e67 100644
--- a/framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php
+++ b/framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php
@@ -35,7 +35,7 @@ Prado::using('System.Data.ActiveRecord.Relations.TActiveRecordRelation');
*
* public $Categories=array(); //foreign object collection.
*
- * protected static $RELATIONS = array
+ * public static $RELATIONS = array
* (
* 'Categories' => array(self::HAS_MANY, 'CategoryRecord', 'Article_Category')
* );
@@ -52,7 +52,7 @@ Prado::using('System.Data.ActiveRecord.Relations.TActiveRecordRelation');
*
* public $Articles=array();
*
- * protected static $RELATIONS = array
+ * public static $RELATIONS = array
* (
* 'Articles' => array(self::HAS_MANY, 'ArticleRecord', 'Article_Category')
* );
diff --git a/framework/Data/ActiveRecord/Relations/TActiveRecordHasOne.php b/framework/Data/ActiveRecord/Relations/TActiveRecordHasOne.php
index 7127d2ac..375c38ef 100644
--- a/framework/Data/ActiveRecord/Relations/TActiveRecordHasOne.php
+++ b/framework/Data/ActiveRecord/Relations/TActiveRecordHasOne.php
@@ -43,7 +43,7 @@ Prado::using('System.Data.ActiveRecord.Relations.TActiveRecordRelation');
*
* public $engine; //engine foreign object
*
- * protected static $RELATIONS=array
+ * public static $RELATIONS=array
* (
* 'engine' => array(self::HAS_ONE, 'EngineRecord')
* );
diff --git a/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php b/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php
index 16b29861..c9b47d12 100644
--- a/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php
+++ b/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php
@@ -68,11 +68,7 @@ class TActiveRecordRelationContext
public function getRecordRelationships()
{
$class = new ReflectionClass($this->_sourceRecord);
- $statics = $class->getStaticProperties();
- if(isset($statics[self::RELATIONS_CONST]))
- return $statics[self::RELATIONS_CONST];
- else
- return array();
+ return $class->getStaticPropertyValue(self::RELATIONS_CONST);
}
public function getPropertyValue()