From ea0601cdd4a732fc15b83104a47788989bb004b3 Mon Sep 17 00:00:00 2001 From: wei <> Date: Mon, 30 Apr 2007 03:44:49 +0000 Subject: Reverted TActiveRecord::populateObject to protected --- framework/Data/ActiveRecord/TActiveRecord.php | 36 +++++++++++++-------------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'framework/Data/ActiveRecord/TActiveRecord.php') 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(); } -- cgit v1.2.3