diff options
author | wei <> | 2007-04-12 08:05:03 +0000 |
---|---|---|
committer | wei <> | 2007-04-12 08:05:03 +0000 |
commit | dc3bf922d9715bfd1b2105be04a9aabc84a1d7d4 (patch) | |
tree | ff97362f718b6ebb482128527402efe03fe1ac43 /framework/Data/ActiveRecord/TActiveRecord.php | |
parent | 6178a99df0c722581bc61e35559ac5f8af1cc6e8 (diff) |
Refactor and add TTableGateway, System.Data.Common, System.Data.DataGateway
Diffstat (limited to 'framework/Data/ActiveRecord/TActiveRecord.php')
-rw-r--r-- | framework/Data/ActiveRecord/TActiveRecord.php | 27 |
1 files changed, 6 insertions, 21 deletions
diff --git a/framework/Data/ActiveRecord/TActiveRecord.php b/framework/Data/ActiveRecord/TActiveRecord.php index 109ae9a6..70fd7b23 100644 --- a/framework/Data/ActiveRecord/TActiveRecord.php +++ b/framework/Data/ActiveRecord/TActiveRecord.php @@ -250,10 +250,7 @@ abstract class TActiveRecord extends TComponent if(is_string($criteria)) { if(!is_array($parameters) && func_num_args() > 1) - { - $parameters = func_get_args(); - array_shift($parameters); - } + $parameters = array_slice(func_get_args(),1); $criteria=new TActiveRecordCriteria($criteria,$parameters); } $gateway = $this->getRecordManager()->getRecordGateway(); @@ -309,10 +306,7 @@ abstract class TActiveRecord extends TComponent if(is_string($criteria)) { if(!is_array($parameters) && func_num_args() > 1) - { - $parameters = func_get_args(); - array_shift($parameters); - } + $parameters = array_slice(func_get_args(),1);
$criteria=new TActiveRecordCriteria($criteria,$parameters); } $gateway = $this->getRecordManager()->getRecordGateway(); @@ -332,10 +326,7 @@ abstract class TActiveRecord extends TComponent if(is_string($criteria)) { if(!is_array($parameters) && func_num_args() > 1) - { - $parameters = func_get_args(); - array_shift($parameters); - } + $parameters = array_slice(func_get_args(),1);
$criteria=new TActiveRecordCriteria($criteria,$parameters); } $gateway = $this->getRecordManager()->getRecordGateway(); @@ -407,10 +398,7 @@ abstract class TActiveRecord extends TComponent public function findBySql($sql,$parameters=array()) { if(!is_array($parameters) && func_num_args() > 1) - { - $parameters = func_get_args(); - array_shift($parameters); - } + $parameters = array_slice(func_get_args(),1);
$gateway = $this->getRecordManager()->getRecordGateway(); $data = $gateway->findRecordsBySql($this,$sql,$parameters); $results = array(); @@ -430,11 +418,8 @@ abstract class TActiveRecord extends TComponent { if(is_string($criteria)) { - if(!is_array($parameters) && func_num_args() > 1) - { - $parameters = func_get_args(); - array_shift($parameters); - } + if(!is_array($parameters) && func_num_args() > 1)
+ $parameters = array_slice(func_get_args(),1); $criteria=new TActiveRecordCriteria($criteria,$parameters); } $gateway = $this->getRecordManager()->getRecordGateway(); |