summaryrefslogtreecommitdiff
path: root/framework/Data/ActiveRecord/TActiveRecord.php
diff options
context:
space:
mode:
authorwei <>2007-04-30 03:44:49 +0000
committerwei <>2007-04-30 03:44:49 +0000
commitea0601cdd4a732fc15b83104a47788989bb004b3 (patch)
tree3366e670cc904001c02f71f969fcedd90129f6a9 /framework/Data/ActiveRecord/TActiveRecord.php
parent970057f16ae4ca2a85ad6710c0d6e371f0bf003d (diff)
Reverted TActiveRecord::populateObject to protected
Diffstat (limited to 'framework/Data/ActiveRecord/TActiveRecord.php')
-rw-r--r--framework/Data/ActiveRecord/TActiveRecord.php36
1 files changed, 18 insertions, 18 deletions
diff --git a/framework/Data/ActiveRecord/TActiveRecord.php b/framework/Data/ActiveRecord/TActiveRecord.php
index 67057554..2ff3f1d4 100644
--- a/framework/Data/ActiveRecord/TActiveRecord.php
+++ b/framework/Data/ActiveRecord/TActiveRecord.php
@@ -10,9 +10,9 @@
* @package System.Data.ActiveRecord
*/
-/**
- * Load record manager, criteria and relations.
- */
+/**
+ * Load record manager, criteria and relations.
+ */
Prado::using('System.Data.ActiveRecord.TActiveRecordManager');
Prado::using('System.Data.ActiveRecord.TActiveRecordCriteria');
Prado::using('System.Data.ActiveRecord.Relations.TActiveRecordRelationContext');
@@ -282,7 +282,7 @@ abstract class TActiveRecord extends TComponent
* @param array name value pair record data
* @return TActiveRecord object record, null if data is empty.
*/
- public function populateObject($type, $data)
+ protected function populateObject($type, $data)
{
if(empty($data)) return null;
$registry = $this->getRecordManager()->getObjectStateRegistry();
@@ -311,7 +311,7 @@ abstract class TActiveRecord extends TComponent
/**
* @param TDbDataReader data reader
*/
- public function collectObjects($reader)
+ protected function collectObjects($reader)
{
$result=array();
$class = get_class($this);
@@ -428,14 +428,14 @@ abstract class TActiveRecord extends TComponent
}
/**
- * Fetches records using the sql clause "(fields) IN (values)", where
- * fields is an array of column names and values is an array of values that
- * the columns must have.
- *
- * This method is to be used by the relationship handler.
- *
- * @param TActiveRecordCriteria additional criteria
- * @param array field names to match with "(fields) IN (values)" sql clause.
+ * Fetches records using the sql clause "(fields) IN (values)", where
+ * fields is an array of column names and values is an array of values that
+ * the columns must have.
+ *
+ * This method is to be used by the relationship handler.
+ *
+ * @param TActiveRecordCriteria additional criteria
+ * @param array field names to match with "(fields) IN (values)" sql clause.
* @param array matching field values.
* @return array matching active records.
*/
@@ -461,17 +461,17 @@ abstract class TActiveRecord extends TComponent
return $gateway->countRecords($this,$criteria);
}
- /**
- * Returns the active record relationship handler for $RELATION with key
+ /**
+ * Returns the active record relationship handler for $RELATION with key
* value equal to the $property value.
- * @param string relationship property name.
+ * @param string relationship property name.
* @param array method call arguments.
* @return TActiveRecordRelation
*/
protected function getRelationHandler($property,$args)
{
- $criteria = $this->getCriteria(count($args)>0 ? $args[0] : null, array_slice($args,1));
- $context = new TActiveRecordRelationContext($this, $property, $criteria);
+ $criteria = $this->getCriteria(count($args)>0 ? $args[0] : null, array_slice($args,1));
+ $context = new TActiveRecordRelationContext($this, $property, $criteria);
return $context->getRelationHandler();
}