diff options
author | wei <> | 2006-12-09 09:17:22 +0000 |
---|---|---|
committer | wei <> | 2006-12-09 09:17:22 +0000 |
commit | 3c03a42d1edb0ec26110ace00f42e156cabff67b (patch) | |
tree | 66baa1cd4afca87668be07e62406e7d538dd1fbb /framework/Data/ActiveRecord | |
parent | 33b2284955a8f0015922d4c69c5082141b584f27 (diff) |
Fixed #433, #384, #439, #477, #435, #422, #401, #359. Add more class docs for sqlmap.
Diffstat (limited to 'framework/Data/ActiveRecord')
-rw-r--r-- | framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php | 4 | ||||
-rw-r--r-- | framework/Data/ActiveRecord/TActiveRecord.php | 18 | ||||
-rw-r--r-- | framework/Data/ActiveRecord/TActiveRecordManager.php | 10 |
3 files changed, 19 insertions, 13 deletions
diff --git a/framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php b/framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php index 1df54035..45a575dd 100644 --- a/framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php +++ b/framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php @@ -7,7 +7,7 @@ * @copyright Copyright © 2005-2007 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
- * @package System.Data.ActiveRecord.Exceptions
+ * @package System.Data.ActiveRecord
*/
/**
@@ -15,7 +15,7 @@ *
* @author Wei Zhuo <weizho[at]gmail[dot]com>
* @version $Id$
- * @package System.Data.ActiveRecord.Exceptions
+ * @package System.Data.ActiveRecord
* @since 3.1
*/
class TActiveRecordException extends TException
diff --git a/framework/Data/ActiveRecord/TActiveRecord.php b/framework/Data/ActiveRecord/TActiveRecord.php index 4969da09..0855fabf 100644 --- a/framework/Data/ActiveRecord/TActiveRecord.php +++ b/framework/Data/ActiveRecord/TActiveRecord.php @@ -48,7 +48,8 @@ Prado::using('System.Data.ActiveRecord.TActiveRecordCriteria'); * }
*
* //create a connection and give it to the ActiveRecord manager.
- * $conn = new TDbConnection('pgsql:host=localhost;dbname=test', 'dbuser','dbpass');
+ * $dsn = 'pgsql:host=localhost;dbname=test';
+ * $conn = new TDbConnection($dsn, 'dbuser','dbpass');
* TActiveRecordManager::getInstance()->setDbConnection($conn);
*
* //load the user record with username (primary key) 'admin'.
@@ -190,12 +191,16 @@ abstract class TActiveRecord extends TComponent * For composite primary keys (determined from the table definitions):
* <code>
* $finder->deleteByPk(array($key1,$key2)); //delete 1 record
- * $finder->deleteByPk(array($key1,$key2), array($key3,$key4),...); //delete multiple records
- * $finder->deleteByPk(array( array($key1,$key2), array($key3,$key4), .. )); //delete multiple records
+ *
+ * //delete multiple records
+ * $finder->deleteByPk(array($key1,$key2), array($key3,$key4),...);
+ *
+ * //delete multiple records
+ * $finder->deleteByPk(array( array($key1,$key2), array($key3,$key4), .. ));
* </code>
*
- * @param unknown_type $keys
- * @return unknown
+ * @param mixed primary key values.
+ * @return int number of records deleted.
*/
public function deleteByPk($keys)
{
@@ -237,7 +242,8 @@ abstract class TActiveRecord extends TComponent *
* Usage:
* <code>
- * $finder->find('username = :name AND password = :pass', array(':name'=>$name, ':pass'=>$pass));
+ * $finder->find('username = :name AND password = :pass',
+ * array(':name'=>$name, ':pass'=>$pass));
* $finder->find('username = ? AND password = ?', array($name, $pass));
* $finder->find('username = ? AND password = ?', $name, $pass);
* //$criteria is of TActiveRecordCriteria
diff --git a/framework/Data/ActiveRecord/TActiveRecordManager.php b/framework/Data/ActiveRecord/TActiveRecordManager.php index 12ca993f..883abbf2 100644 --- a/framework/Data/ActiveRecord/TActiveRecordManager.php +++ b/framework/Data/ActiveRecord/TActiveRecordManager.php @@ -19,9 +19,9 @@ Prado::using('System.Data.ActiveRecord.TActiveRecordStateRegistry'); * TActiveRecordManager provides the default DB connection, default object state
* registry, default active record gateway, and table meta data inspector.
*
- * You can provide a different registry by overriding the createObjectStateRegistry() method.
- * Similarly, override createRecordGateway() for default gateway and override
- * createMetaDataInspector() for meta data inspector.
+ * You can provide a different registry by overriding the {@link createObjectStateRegistry()} method.
+ * Similarly, override {@link createRecordGateway()} for default gateway and override
+ * {@link createMetaDataInspector() }for meta data inspector.
*
* The default connection can be set as follows:
* <code>
@@ -30,8 +30,8 @@ Prado::using('System.Data.ActiveRecord.TActiveRecordStateRegistry'); * All new active record created after setting the
* {@link DbConnection setDbConnection()} will use that connection.
*
- * The {@link OnInsert onInsert()}, {@link OnUpdate onUpdate()},
- * {@link OnDelete onDelete()} and {@link onSelect onSelect()} events are raised
+ * The {@link onInsert()}, {@link onUpdate()},
+ * {@link onDelete()} and {@link onSelect()} events are raised
* <b>before</b> their respective command are executed.
*
* @author Wei Zhuo <weizho[at]gmail[dot]com>
|