diff options
Diffstat (limited to 'framework/Data')
120 files changed, 759 insertions, 567 deletions
diff --git a/framework/Data/ActiveRecord/Exceptions/TActiveRecordConfigurationException.php b/framework/Data/ActiveRecord/Exceptions/TActiveRecordConfigurationException.php index a1c07b8c..f309c954 100644 --- a/framework/Data/ActiveRecord/Exceptions/TActiveRecordConfigurationException.php +++ b/framework/Data/ActiveRecord/Exceptions/TActiveRecordConfigurationException.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord + * @package Prado\Data\ActiveRecord\Exceptions */ +namespace Prado\Data\ActiveRecord\Exceptions; + /** * TActiveRecordConfigurationException class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.ActiveRecord + * @package Prado\Data\ActiveRecord\Exceptions * @since 3.1 */ class TActiveRecordConfigurationException extends TActiveRecordException diff --git a/framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php b/framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php index a252631c..063a4cd3 100644 --- a/framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php +++ b/framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord + * @package Prado\Data\ActiveRecord\Exceptions */ +namespace Prado\Data\ActiveRecord\Exceptions; + /** * Base exception class for Active Records. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.ActiveRecord + * @package Prado\Data\ActiveRecord\Exceptions * @since 3.1 */ class TActiveRecordException extends TDbException diff --git a/framework/Data/ActiveRecord/Relations/TActiveRecordBelongsTo.php b/framework/Data/ActiveRecord/Relations/TActiveRecordBelongsTo.php index 2197b48c..f3687b9b 100644 --- a/framework/Data/ActiveRecord/Relations/TActiveRecordBelongsTo.php +++ b/framework/Data/ActiveRecord/Relations/TActiveRecordBelongsTo.php @@ -7,9 +7,11 @@ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ - * @package System.Data.ActiveRecord.Relations + * @package Prado\Data\ActiveRecord\Relations */ +namespace Prado\Data\ActiveRecord\Relations; + /** * Loads base active record relationship class. */ @@ -65,7 +67,7 @@ Prado::using('System.Data.ActiveRecord.Relations.TActiveRecordRelation'); * * @author Wei Zhuo <weizho[at]gmail[dot]com> * @version $Id$ - * @package System.Data.ActiveRecord.Relations + * @package Prado\Data\ActiveRecord\Relations * @since 3.1 */ class TActiveRecordBelongsTo extends TActiveRecordRelation diff --git a/framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php b/framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php index 92fe495a..330d7c39 100644 --- a/framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php +++ b/framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php @@ -7,9 +7,11 @@ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ - * @package System.Data.ActiveRecord.Relations + * @package Prado\Data\ActiveRecord\Relations */ +namespace Prado\Data\ActiveRecord\Relations; + /** * Loads base active record relations class. */ @@ -63,7 +65,7 @@ Prado::using('System.Data.ActiveRecord.Relations.TActiveRecordRelation'); * * @author Wei Zhuo <weizho[at]gmail[dot]com> * @version $Id$ - * @package System.Data.ActiveRecord.Relations + * @package Prado\Data\ActiveRecord\Relations * @since 3.1 */ class TActiveRecordHasMany extends TActiveRecordRelation diff --git a/framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php b/framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php index 1b58f112..449739e3 100644 --- a/framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php +++ b/framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php @@ -7,9 +7,11 @@ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ - * @package System.Data.ActiveRecord.Relations + * @package Prado\Data\ActiveRecord\Relations */ +namespace Prado\Data\ActiveRecord\Relations; + /** * Loads base active record relations class. */ @@ -79,7 +81,7 @@ Prado::using('System.Data.ActiveRecord.Relations.TActiveRecordRelation'); * * @author Wei Zhuo <weizho[at]gmail[dot]com> * @version $Id$ - * @package System.Data.ActiveRecord.Relations + * @package Prado\Data\ActiveRecord\Relations * @since 3.1 */ class TActiveRecordHasManyAssociation extends TActiveRecordRelation diff --git a/framework/Data/ActiveRecord/Relations/TActiveRecordHasOne.php b/framework/Data/ActiveRecord/Relations/TActiveRecordHasOne.php index 46c4d9fb..005ad98c 100644 --- a/framework/Data/ActiveRecord/Relations/TActiveRecordHasOne.php +++ b/framework/Data/ActiveRecord/Relations/TActiveRecordHasOne.php @@ -7,9 +7,11 @@ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ - * @package System.Data.ActiveRecord.Relations + * @package Prado\Data\ActiveRecord\Relations */ +namespace Prado\Data\ActiveRecord\Relations; + /** * Loads base active record relationship class. */ @@ -80,7 +82,7 @@ Prado::using('System.Data.ActiveRecord.Relations.TActiveRecordRelation'); * * @author Wei Zhuo <weizho[at]gmail[dot]com> * @version $Id$ - * @package System.Data.ActiveRecord.Relations + * @package Prado\Data\ActiveRecord\Relations * @since 3.1 */ class TActiveRecordHasOne extends TActiveRecordRelation diff --git a/framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php b/framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php index 7fe2d468..51bcaee2 100644 --- a/framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php +++ b/framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php @@ -7,9 +7,11 @@ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ - * @package System.Data.ActiveRecord.Relations + * @package Prado\Data\ActiveRecord\Relations */ +namespace Prado\Data\ActiveRecord\Relations; + /** * Load active record relationship context. */ @@ -20,7 +22,7 @@ Prado::using('System.Data.ActiveRecord.Relations.TActiveRecordRelationContext'); * * @author Wei Zhuo <weizho[at]gmail[dot]com> * @version $Id$ - * @package System.Data.ActiveRecord.Relations + * @package Prado\Data\ActiveRecord\Relations * @since 3.1 */ abstract class TActiveRecordRelation diff --git a/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php b/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php index 961dcd91..862d9b4c 100644 --- a/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php +++ b/framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php @@ -7,9 +7,11 @@ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ - * @package System.Data.ActiveRecord.Relations + * @package Prado\Data\ActiveRecord\Relations */ +namespace Prado\Data\ActiveRecord\Relations; + /** * TActiveRecordRelationContext holds information regarding record relationships * such as record relation property name, query criteria and foreign object record @@ -20,7 +22,7 @@ * * @author Wei Zhuo <weizho[at]gmail[dot]com> * @version $Id$ - * @package System.Data.ActiveRecord.Relations + * @package Prado\Data\ActiveRecord\Relations * @since 3.1 */ class TActiveRecordRelationContext diff --git a/framework/Data/ActiveRecord/Scaffold/IScaffoldEditRenderer.php b/framework/Data/ActiveRecord/Scaffold/IScaffoldEditRenderer.php index e7f85065..a82f71d2 100644 --- a/framework/Data/ActiveRecord/Scaffold/IScaffoldEditRenderer.php +++ b/framework/Data/ActiveRecord/Scaffold/IScaffoldEditRenderer.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord.Scaffold + * @package Prado\Data\ActiveRecord\Scaffold */ +namespace Prado\Data\ActiveRecord\Scaffold; + /** * IScaffoldEditRenderer interface. * @@ -18,7 +20,7 @@ * that is called before the save() method is called on the TActiveRecord. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.ActiveRecord.Scaffold + * @package Prado\Data\ActiveRecord\Scaffold * @since 3.1 */ interface IScaffoldEditRenderer extends IDataRenderer diff --git a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TIbmScaffoldInput.php b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TIbmScaffoldInput.php index 0a2c0cd3..8f3d78ff 100644 --- a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TIbmScaffoldInput.php +++ b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TIbmScaffoldInput.php @@ -6,8 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord.Scaffold.InputBuilder + * @package Prado\Data\ActiveRecord\Scaffold\InputBuilder */ + +namespace Prado\Data\ActiveRecord\Scaffold\InputBuilder; + Prado::using('System.Data.ActiveRecord.Scaffold.InputBuilder.TScaffoldInputCommon'); class TIbmScaffoldInput extends TScaffoldInputCommon diff --git a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMssqlScaffoldInput.php b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMssqlScaffoldInput.php index 1cb73438..f713383f 100644 --- a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMssqlScaffoldInput.php +++ b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMssqlScaffoldInput.php @@ -5,8 +5,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord.Scaffold.InputBuilder + * @package Prado\Data\ActiveRecord\Scaffold\InputBuilder */ + +namespace Prado\Data\ActiveRecord\Scaffold\InputBuilder; + Prado::using('System.Data.ActiveRecord.Scaffold.InputBuilder.TScaffoldInputCommon'); class TMssqlScaffoldInput extends TScaffoldInputCommon diff --git a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php index e2e75318..36585645 100644 --- a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php +++ b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php @@ -5,8 +5,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord.Scaffold.InputBuilder + * @package Prado\Data\ActiveRecord\Scaffold\InputBuilder */ + +namespace Prado\Data\ActiveRecord\Scaffold\InputBuilder; + Prado::using('System.Data.ActiveRecord.Scaffold.InputBuilder.TScaffoldInputCommon'); class TMysqlScaffoldInput extends TScaffoldInputCommon diff --git a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TPgsqlScaffoldInput.php b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TPgsqlScaffoldInput.php index 6d10874a..83823403 100644 --- a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TPgsqlScaffoldInput.php +++ b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TPgsqlScaffoldInput.php @@ -5,8 +5,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord.Scaffold.InputBuilder + * @package Prado\Data\ActiveRecord\Scaffold\InputBuilder */ + +namespace Prado\Data\ActiveRecord\Scaffold\InputBuilder; + Prado::using('System.Data.ActiveRecord.Scaffold.InputBuilder.TScaffoldInputCommon'); class TPgsqlScaffoldInput extends TScaffoldInputCommon diff --git a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputBase.php b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputBase.php index 14244b4c..df0b9fa3 100644 --- a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputBase.php +++ b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputBase.php @@ -5,8 +5,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord.Scaffold.InputBuilder + * @package Prado\Data\ActiveRecord\Scaffold\InputBuilder */ + +namespace Prado\Data\ActiveRecord\Scaffold\InputBuilder; + class TScaffoldInputBase { const DEFAULT_ID = 'scaffold_input'; diff --git a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputCommon.php b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputCommon.php index 3394680e..85e6a7c3 100644 --- a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputCommon.php +++ b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputCommon.php @@ -5,8 +5,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord.Scaffold.InputBuilder + * @package Prado\Data\ActiveRecord\Scaffold\InputBuilder */ + +namespace Prado\Data\ActiveRecord\Scaffold\InputBuilder; + Prado::using('System.Data.ActiveRecord.Scaffold.InputBuilder.TScaffoldInputBase'); class TScaffoldInputCommon extends TScaffoldInputBase diff --git a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TSqliteScaffoldInput.php b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TSqliteScaffoldInput.php index 441d2770..2a06548e 100644 --- a/framework/Data/ActiveRecord/Scaffold/InputBuilder/TSqliteScaffoldInput.php +++ b/framework/Data/ActiveRecord/Scaffold/InputBuilder/TSqliteScaffoldInput.php @@ -5,8 +5,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord.Scaffold.InputBuilder + * @package Prado\Data\ActiveRecord\Scaffold\InputBuilder */ + +namespace Prado\Data\ActiveRecord\Scaffold\InputBuilder; + Prado::using('System.Data.ActiveRecord.Scaffold.InputBuilder.TScaffoldInputCommon'); class TSqliteScaffoldInput extends TScaffoldInputCommon diff --git a/framework/Data/ActiveRecord/Scaffold/TScaffoldBase.php b/framework/Data/ActiveRecord/Scaffold/TScaffoldBase.php index 122dfbd2..209fd5bd 100644 --- a/framework/Data/ActiveRecord/Scaffold/TScaffoldBase.php +++ b/framework/Data/ActiveRecord/Scaffold/TScaffoldBase.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord.Scaffold + * @package Prado\Data\ActiveRecord\Scaffold */ +namespace Prado\Data\ActiveRecord\Scaffold; + /** * Include the base Active Record class. */ @@ -25,7 +27,7 @@ Prado::using('System.Data.ActiveRecord.TActiveRecord'); * file explicitly. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.ActiveRecord.Scaffold + * @package Prado\Data\ActiveRecord\Scaffold * @since 3.1 */ abstract class TScaffoldBase extends TTemplateControl diff --git a/framework/Data/ActiveRecord/Scaffold/TScaffoldEditView.php b/framework/Data/ActiveRecord/Scaffold/TScaffoldEditView.php index 592c958a..234a57f9 100644 --- a/framework/Data/ActiveRecord/Scaffold/TScaffoldEditView.php +++ b/framework/Data/ActiveRecord/Scaffold/TScaffoldEditView.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord.Scaffold + * @package Prado\Data\ActiveRecord\Scaffold */ +namespace Prado\Data\ActiveRecord\Scaffold; + /** * Load scaffold base. */ @@ -42,7 +44,7 @@ Prado::using('System.Data.ActiveRecord.Scaffold.TScaffoldBase'); * xxx is the property name). * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.ActiveRecord.Scaffold + * @package Prado\Data\ActiveRecord\Scaffold * @since 3.1 */ class TScaffoldEditView extends TScaffoldBase diff --git a/framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php b/framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php index afdb126c..619436c3 100644 --- a/framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php +++ b/framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord.Scaffold + * @package Prado\Data\ActiveRecord\Scaffold */ +namespace Prado\Data\ActiveRecord\Scaffold; + /** * Load the scaffold base class. */ @@ -43,7 +45,7 @@ Prado::using('System.Data.ActiveRecord.Scaffold.TScaffoldBase'); * Parameters property of TActiveRecordCriteria. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.ActiveRecord.Scaffold + * @package Prado\Data\ActiveRecord\Scaffold * @since 3.1 */ class TScaffoldListView extends TScaffoldBase diff --git a/framework/Data/ActiveRecord/Scaffold/TScaffoldSearch.php b/framework/Data/ActiveRecord/Scaffold/TScaffoldSearch.php index ea2d2c94..92c261fa 100644 --- a/framework/Data/ActiveRecord/Scaffold/TScaffoldSearch.php +++ b/framework/Data/ActiveRecord/Scaffold/TScaffoldSearch.php @@ -7,9 +7,11 @@ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ - * @package System.Data.ActiveRecord.Scaffold + * @package Prado\Data\ActiveRecord\Scaffold */ +namespace Prado\Data\ActiveRecord\Scaffold; + /** * Import the scaffold base. */ @@ -30,7 +32,7 @@ Prado::using('System.Data.ActiveRecord.Scaffold.TScaffoldBase'); * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> * @version $Id$ - * @package System.Data.ActiveRecord.Scaffold + * @package Prado\Data\ActiveRecord\Scaffold * @since 3.1 */ class TScaffoldSearch extends TScaffoldBase diff --git a/framework/Data/ActiveRecord/Scaffold/TScaffoldView.php b/framework/Data/ActiveRecord/Scaffold/TScaffoldView.php index acc78fd2..f5e03f02 100644 --- a/framework/Data/ActiveRecord/Scaffold/TScaffoldView.php +++ b/framework/Data/ActiveRecord/Scaffold/TScaffoldView.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord.Scaffold + * @package Prado\Data\ActiveRecord\Scaffold */ +namespace Prado\Data\ActiveRecord\Scaffold; + /** * Import scaffold base, list, edit and search controls. */ @@ -34,7 +36,7 @@ Prado::using('System.Data.ActiveRecord.Scaffold.TScaffoldSearch'); * the Active Record class to be displayed/edited/added. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @package System.Data.ActiveRecord.Scaffold + * @package Prado\Data\ActiveRecord\Scaffold * @since 3.0 */ class TScaffoldView extends TScaffoldBase diff --git a/framework/Data/ActiveRecord/TActiveRecord.php b/framework/Data/ActiveRecord/TActiveRecord.php index 5e4755d6..8b295c2f 100644 --- a/framework/Data/ActiveRecord/TActiveRecord.php +++ b/framework/Data/ActiveRecord/TActiveRecord.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord + * @package Prado\Data\ActiveRecord */ +namespace Prado\Data\ActiveRecord; + /** * Load record manager, criteria and relations. */ @@ -141,7 +143,7 @@ Prado::using('System.Data.ActiveRecord.Relations.TActiveRecordRelationContext'); * </code> * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.ActiveRecord + * @package Prado\Data\ActiveRecord * @since 3.1 */ abstract class TActiveRecord extends TComponent diff --git a/framework/Data/ActiveRecord/TActiveRecordChangeEventParameter.php b/framework/Data/ActiveRecord/TActiveRecordChangeEventParameter.php index f1307529..95f923df 100644 --- a/framework/Data/ActiveRecord/TActiveRecordChangeEventParameter.php +++ b/framework/Data/ActiveRecord/TActiveRecordChangeEventParameter.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord + * @package Prado\Data\ActiveRecord */ +namespace Prado\Data\ActiveRecord; + /** * TActiveRecordChangeEventParameter class * @@ -19,7 +21,7 @@ * be set to false to prevent the requested change event to be performed. * * @author Wei Zhuo<weizhuo@gmail.com> - * @package System.Data.ActiveRecord + * @package Prado\Data\ActiveRecord * @since 3.1.2 */ class TActiveRecordChangeEventParameter extends TEventParameter diff --git a/framework/Data/ActiveRecord/TActiveRecordConfig.php b/framework/Data/ActiveRecord/TActiveRecordConfig.php index 6e726df0..e862b52b 100644 --- a/framework/Data/ActiveRecord/TActiveRecordConfig.php +++ b/framework/Data/ActiveRecord/TActiveRecordConfig.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord + * @package Prado\Data\ActiveRecord */ +namespace Prado\Data\ActiveRecord; + Prado::using('System.Data.TDataSourceConfig'); Prado::using('System.Data.ActiveRecord.TActiveRecordManager'); @@ -65,7 +67,7 @@ Prado::using('System.Data.ActiveRecord.TActiveRecordManager'); * </code> * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.ActiveRecord + * @package Prado\Data\ActiveRecord * @since 3.1 */ class TActiveRecordConfig extends TDataSourceConfig diff --git a/framework/Data/ActiveRecord/TActiveRecordCriteria.php b/framework/Data/ActiveRecord/TActiveRecordCriteria.php index aec3ce53..59a80212 100644 --- a/framework/Data/ActiveRecord/TActiveRecordCriteria.php +++ b/framework/Data/ActiveRecord/TActiveRecordCriteria.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord + * @package Prado\Data\ActiveRecord */ +namespace Prado\Data\ActiveRecord; + Prado::using('System.Data.DataGateway.TSqlCriteria'); /** @@ -27,7 +29,7 @@ Prado::using('System.Data.DataGateway.TSqlCriteria'); * </code> * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.ActiveRecord + * @package Prado\Data\ActiveRecord * @since 3.1 */ class TActiveRecordCriteria extends TSqlCriteria diff --git a/framework/Data/ActiveRecord/TActiveRecordGateway.php b/framework/Data/ActiveRecord/TActiveRecordGateway.php index 4d4fdac1..de0be08d 100644 --- a/framework/Data/ActiveRecord/TActiveRecordGateway.php +++ b/framework/Data/ActiveRecord/TActiveRecordGateway.php @@ -6,15 +6,17 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord + * @package Prado\Data\ActiveRecord */ +namespace Prado\Data\ActiveRecord; + /** * TActiveRecordGateway excutes the SQL command queries and returns the data * record as arrays (for most finder methods). * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.ActiveRecord + * @package Prado\Data\ActiveRecord * @since 3.1 */ class TActiveRecordGateway extends TComponent diff --git a/framework/Data/ActiveRecord/TActiveRecordInvalidFinderResult.php b/framework/Data/ActiveRecord/TActiveRecordInvalidFinderResult.php index 1d02f4c8..9e02027c 100644 --- a/framework/Data/ActiveRecord/TActiveRecordInvalidFinderResult.php +++ b/framework/Data/ActiveRecord/TActiveRecordInvalidFinderResult.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord + * @package Prado\Data\ActiveRecord */ +namespace Prado\Data\ActiveRecord; + /** * TActiveRecordInvalidFinderResult class. * TActiveRecordInvalidFinderResult defines the enumerable type for possible results @@ -19,7 +21,7 @@ * - Exception: throws a TActiveRecordException * * @author Yves Berkholz <godzilla80@gmx.net> - * @package System.Data.ActiveRecord + * @package Prado\Data\ActiveRecord * @see TActiveRecordManager::setInvalidFinderResult * @see TActiveRecordConfig::setInvalidFinderResult * @see TActiveRecord::setInvalidFinderResult diff --git a/framework/Data/ActiveRecord/TActiveRecordManager.php b/framework/Data/ActiveRecord/TActiveRecordManager.php index 4aa2cde9..74a78e0e 100644 --- a/framework/Data/ActiveRecord/TActiveRecordManager.php +++ b/framework/Data/ActiveRecord/TActiveRecordManager.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.ActiveRecord + * @package Prado\Data\ActiveRecord */ +namespace Prado\Data\ActiveRecord; + Prado::using('System.Data.TDbConnection'); Prado::using('System.Data.ActiveRecord.TActiveRecord'); Prado::using('System.Data.ActiveRecord.Exceptions.TActiveRecordException'); @@ -30,7 +32,7 @@ Prado::using('System.Data.ActiveRecord.TActiveRecordGateway'); * the active record gateway to cache the table meta data information. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.ActiveRecord + * @package Prado\Data\ActiveRecord * @since 3.1 */ class TActiveRecordManager extends TComponent diff --git a/framework/Data/Common/Mssql/TMssqlCommandBuilder.php b/framework/Data/Common/Mssql/TMssqlCommandBuilder.php index ac718bcb..d2273d72 100644 --- a/framework/Data/Common/Mssql/TMssqlCommandBuilder.php +++ b/framework/Data/Common/Mssql/TMssqlCommandBuilder.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common + * @package Prado\Data\Common\Mssql */ +namespace Prado\Data\Common\Mssql; + Prado::using('System.Data.Common.TDbCommandBuilder'); /** @@ -16,7 +18,7 @@ Prado::using('System.Data.Common.TDbCommandBuilder'); * for MSSQL servers. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common + * @package Prado\Data\Common\Mssql * @since 3.1 */ class TMssqlCommandBuilder extends TDbCommandBuilder diff --git a/framework/Data/Common/Mssql/TMssqlMetaData.php b/framework/Data/Common/Mssql/TMssqlMetaData.php index 990639af..d5581ed0 100644 --- a/framework/Data/Common/Mssql/TMssqlMetaData.php +++ b/framework/Data/Common/Mssql/TMssqlMetaData.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common.Mssql + * @package Prado\Data\Common\Mssql */ +namespace Prado\Data\Common\Mssql; + /** * Load the base TDbMetaData class. */ @@ -19,7 +21,7 @@ Prado::using('System.Data.Common.Mssql.TMssqlTableInfo'); * TMssqlMetaData loads MSSQL database table and column information. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common.Mssql + * @package Prado\Data\Common\Mssql * @since 3.1 */ class TMssqlMetaData extends TDbMetaData diff --git a/framework/Data/Common/Mssql/TMssqlTableColumn.php b/framework/Data/Common/Mssql/TMssqlTableColumn.php index e3bd431e..9ce0cc1d 100644 --- a/framework/Data/Common/Mssql/TMssqlTableColumn.php +++ b/framework/Data/Common/Mssql/TMssqlTableColumn.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common.Mssql + * @package Prado\Data\Common\Mssql */ +namespace Prado\Data\Common\Mssql; + /** * Load common TDbTableCommon class. */ @@ -18,7 +20,7 @@ Prado::using('System.Data.Common.TDbTableColumn'); * Describes the column metadata of the schema for a Mssql database table. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common.Mssql + * @package Prado\Data\Common\Mssql * @since 3.1 */ class TMssqlTableColumn extends TDbTableColumn diff --git a/framework/Data/Common/Mssql/TMssqlTableInfo.php b/framework/Data/Common/Mssql/TMssqlTableInfo.php index d003b336..005b767f 100644 --- a/framework/Data/Common/Mssql/TMssqlTableInfo.php +++ b/framework/Data/Common/Mssql/TMssqlTableInfo.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common.Mssql + * @package Prado\Data\Common\Mssql */ +namespace Prado\Data\Common\Mssql; + /** * Loads the base TDbTableInfo class and TMssqlTableColumn class. */ @@ -19,7 +21,7 @@ Prado::using('System.Data.Common.Mssql.TMssqlTableColumn'); * TMssqlTableInfo class provides additional table information for Mssql database. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common.Mssql + * @package Prado\Data\Common\Mssql * @since 3.1 */ class TMssqlTableInfo extends TDbTableInfo diff --git a/framework/Data/Common/Mysql/TMysqlCommandBuilder.php b/framework/Data/Common/Mysql/TMysqlCommandBuilder.php index 38e98b4f..fd9f9aef 100644 --- a/framework/Data/Common/Mysql/TMysqlCommandBuilder.php +++ b/framework/Data/Common/Mysql/TMysqlCommandBuilder.php @@ -6,16 +6,18 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common + * @package Prado\Data\Common\Mysql */ +namespace Prado\Data\Common\Mysql; + Prado::using('System.Data.Common.TDbCommandBuilder'); /** * TMysqlCommandBuilder implements default TDbCommandBuilder * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common + * @package Prado\Data\Common\Mysql * @since 3.1 */ class TMysqlCommandBuilder extends TDbCommandBuilder diff --git a/framework/Data/Common/Mysql/TMysqlMetaData.php b/framework/Data/Common/Mysql/TMysqlMetaData.php index 94826e03..668c8413 100644 --- a/framework/Data/Common/Mysql/TMysqlMetaData.php +++ b/framework/Data/Common/Mysql/TMysqlMetaData.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common.Mysql + * @package Prado\Data\Common\Mysql */ +namespace Prado\Data\Common\Mysql; + /** * Load the base TDbMetaData class. */ @@ -22,7 +24,7 @@ Prado::using('System.Data.Common.Mysql.TMysqlTableInfo'); * See http://netevil.org/node.php?nid=795&SC=1 * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common.Mysql + * @package Prado\Data\Common\Mysql * @since 3.1 */ class TMysqlMetaData extends TDbMetaData diff --git a/framework/Data/Common/Mysql/TMysqlTableColumn.php b/framework/Data/Common/Mysql/TMysqlTableColumn.php index dd62f0f6..4ad936f5 100644 --- a/framework/Data/Common/Mysql/TMysqlTableColumn.php +++ b/framework/Data/Common/Mysql/TMysqlTableColumn.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common.Mysql + * @package Prado\Data\Common\Mysql */ +namespace Prado\Data\Common\Mysql; + /** * Load common TDbTableCommon class. */ @@ -18,7 +20,7 @@ Prado::using('System.Data.Common.TDbTableColumn'); * Describes the column metadata of the schema for a Mysql database table. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common.Mysql + * @package Prado\Data\Common\Mysql * @since 3.1 */ class TMysqlTableColumn extends TDbTableColumn diff --git a/framework/Data/Common/Mysql/TMysqlTableInfo.php b/framework/Data/Common/Mysql/TMysqlTableInfo.php index 17b32aa9..041b12ff 100644 --- a/framework/Data/Common/Mysql/TMysqlTableInfo.php +++ b/framework/Data/Common/Mysql/TMysqlTableInfo.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common.Mysql + * @package Prado\Data\Common\Mysql */ +namespace Prado\Data\Common\Mysql; + /** * Loads the base TDbTableInfo class and TMysqlTableColumn class. */ @@ -19,7 +21,7 @@ Prado::using('System.Data.Common.Mysql.TMysqlTableColumn'); * TMysqlTableInfo class provides additional table information for MySQL database. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common.Mysql + * @package Prado\Data\Common\Mysql * @since 3.1 */ class TMysqlTableInfo extends TDbTableInfo diff --git a/framework/Data/Common/Oracle/TOracleCommandBuilder.php b/framework/Data/Common/Oracle/TOracleCommandBuilder.php index 56173c3a..139ecc78 100644 --- a/framework/Data/Common/Oracle/TOracleCommandBuilder.php +++ b/framework/Data/Common/Oracle/TOracleCommandBuilder.php @@ -7,17 +7,19 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common + * @package Prado\Data\Common\Oracle */ -Prado :: using('System.Data.Common.TDbCommandBuilder'); +namespace Prado\Data\Common\Oracle; + +Prado::using('System.Data.Common.TDbCommandBuilder'); /** * TOracleCommandBuilder provides specifics methods to create limit/offset query commands * for Oracle database. * * @author Marcos Nobre <marconobre[at]gmail[dot]com> - * @package System.Data.Common + * @package Prado\Data\Common\Oracle * @since 3.1 */ class TOracleCommandBuilder extends TDbCommandBuilder { diff --git a/framework/Data/Common/Oracle/TOracleMetaData.php b/framework/Data/Common/Oracle/TOracleMetaData.php index fc1800c5..2b6e9774 100644 --- a/framework/Data/Common/Oracle/TOracleMetaData.php +++ b/framework/Data/Common/Oracle/TOracleMetaData.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common.Oracle + * @package Prado\Data\Common\Oracle */ +namespace Prado\Data\Common\Oracle; + /** * Load the base TDbMetaData class. */ @@ -20,7 +22,7 @@ Prado::using('System.Data.Common.Oracle.TOracleTableColumn'); * TOracleMetaData loads Oracle database table and column information. * * @author Marcos Nobre <marconobre[at]gmail[dot]com> - * @package System.Data.Common.Oracle + * @package Prado\Data\Common\Oracle * @since 3.1 */ class TOracleMetaData extends TDbMetaData diff --git a/framework/Data/Common/Oracle/TOracleTableColumn.php b/framework/Data/Common/Oracle/TOracleTableColumn.php index bc89d8c5..7b978336 100644 --- a/framework/Data/Common/Oracle/TOracleTableColumn.php +++ b/framework/Data/Common/Oracle/TOracleTableColumn.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common.Oracle + * @package Prado\Data\Common\Oracle */ +namespace Prado\Data\Common\Oracle; + /** * Load common TDbTableCommon class. */ @@ -18,7 +20,7 @@ Prado::using('System.Data.Common.TDbTableColumn'); * Describes the column metadata of the schema for a PostgreSQL database table. * * @author Marcos Nobre <marconobre[at]gmail[dot]com> - * @package System.Data.Common.Oracle + * @package Prado\Data\Common\Oracle * @since 3.1 */ class TOracleTableColumn extends TDbTableColumn diff --git a/framework/Data/Common/Oracle/TOracleTableInfo.php b/framework/Data/Common/Oracle/TOracleTableInfo.php index 4a2e31fd..e3935d5f 100644 --- a/framework/Data/Common/Oracle/TOracleTableInfo.php +++ b/framework/Data/Common/Oracle/TOracleTableInfo.php @@ -7,14 +7,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common + * @package Prado\Data\Common\Oracle */ +namespace Prado\Data\Common\Oracle; + /** * TDbTableInfo class describes the meta data of a database table. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common + * @package Prado\Data\Common\Oracle * @since 3.1 */ class TOracleTableInfo extends TComponent diff --git a/framework/Data/Common/Pgsql/TPgsqlCommandBuilder.php b/framework/Data/Common/Pgsql/TPgsqlCommandBuilder.php index 851dabb5..d9d0c987 100644 --- a/framework/Data/Common/Pgsql/TPgsqlCommandBuilder.php +++ b/framework/Data/Common/Pgsql/TPgsqlCommandBuilder.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common + * @package Prado\Data\Common\Pgsql */ +namespace Prado\Data\Common\Pgsql; + Prado::using('System.Data.Common.TDbCommandBuilder'); /** @@ -16,7 +18,7 @@ Prado::using('System.Data.Common.TDbCommandBuilder'); * for Pgsql database. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common + * @package Prado\Data\Common\Pgsql * @since 3.1 */ class TPgsqlCommandBuilder extends TDbCommandBuilder diff --git a/framework/Data/Common/Pgsql/TPgsqlMetaData.php b/framework/Data/Common/Pgsql/TPgsqlMetaData.php index e5d30ed7..96f2e091 100644 --- a/framework/Data/Common/Pgsql/TPgsqlMetaData.php +++ b/framework/Data/Common/Pgsql/TPgsqlMetaData.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common.Pgsql + * @package Prado\Data\Common\Pgsql */ +namespace Prado\Data\Common\Pgsql; + /** * Load the base TDbMetaData class. */ @@ -19,7 +21,7 @@ Prado::using('System.Data.Common.Pgsql.TPgsqlTableInfo'); * TPgsqlMetaData loads PostgreSQL database table and column information. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common.Pgsql + * @package Prado\Data\Common\Pgsql * @since 3.1 */ class TPgsqlMetaData extends TDbMetaData diff --git a/framework/Data/Common/Pgsql/TPgsqlTableColumn.php b/framework/Data/Common/Pgsql/TPgsqlTableColumn.php index fd0fd23c..75bd2aac 100644 --- a/framework/Data/Common/Pgsql/TPgsqlTableColumn.php +++ b/framework/Data/Common/Pgsql/TPgsqlTableColumn.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common.Pgsql + * @package Prado\Data\Common\Pgsql */ +namespace Prado\Data\Common\Pgsql; + /** * Load common TDbTableCommon class. */ @@ -18,7 +20,7 @@ Prado::using('System.Data.Common.TDbTableColumn'); * Describes the column metadata of the schema for a PostgreSQL database table. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common.Pgsql + * @package Prado\Data\Common\Pgsql * @since 3.1 */ class TPgsqlTableColumn extends TDbTableColumn diff --git a/framework/Data/Common/Pgsql/TPgsqlTableInfo.php b/framework/Data/Common/Pgsql/TPgsqlTableInfo.php index 43298ffa..bc27a6d5 100644 --- a/framework/Data/Common/Pgsql/TPgsqlTableInfo.php +++ b/framework/Data/Common/Pgsql/TPgsqlTableInfo.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common.Pgsql + * @package Prado\Data\Common\Pgsql */ +namespace Prado\Data\Common\Pgsql; + /** * Loads the base TDbTableInfo class and TPgsqlTableColumn class. */ @@ -19,7 +21,7 @@ Prado::using('System.Data.Common.Pgsql.TPgsqlTableColumn'); * TPgsqlTableInfo class provides additional table information for PostgreSQL database. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common.Pgsql + * @package Prado\Data\Common\Pgsql * @since 3.1 */ class TPgsqlTableInfo extends TDbTableInfo diff --git a/framework/Data/Common/Sqlite/TSqliteCommandBuilder.php b/framework/Data/Common/Sqlite/TSqliteCommandBuilder.php index b442f7b4..fe890a31 100644 --- a/framework/Data/Common/Sqlite/TSqliteCommandBuilder.php +++ b/framework/Data/Common/Sqlite/TSqliteCommandBuilder.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common + * @package Prado\Data\Common\Sqlite */ +namespace Prado\Data\Common\Sqlite; + Prado::using('System.Data.Common.TDbCommandBuilder'); /** @@ -16,7 +18,7 @@ Prado::using('System.Data.Common.TDbCommandBuilder'); * for Sqlite database. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common + * @package Prado\Data\Common\Sqlite * @since 3.1 */ class TSqliteCommandBuilder extends TDbCommandBuilder diff --git a/framework/Data/Common/Sqlite/TSqliteMetaData.php b/framework/Data/Common/Sqlite/TSqliteMetaData.php index b6dd24b7..0985305f 100644 --- a/framework/Data/Common/Sqlite/TSqliteMetaData.php +++ b/framework/Data/Common/Sqlite/TSqliteMetaData.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common.Sqlite + * @package Prado\Data\Common\Sqlite */ +namespace Prado\Data\Common\Sqlite; + /** * Load the base TDbMetaData class. */ @@ -19,7 +21,7 @@ Prado::using('System.Data.Common.Sqlite.TSqliteTableInfo'); * TSqliteMetaData loads SQLite database table and column information. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Commom.Sqlite + * @package Prado\Data\Common\Sqlite * @since 3.1 */ class TSqliteMetaData extends TDbMetaData diff --git a/framework/Data/Common/Sqlite/TSqliteTableColumn.php b/framework/Data/Common/Sqlite/TSqliteTableColumn.php index f54b6f59..ba33b591 100644 --- a/framework/Data/Common/Sqlite/TSqliteTableColumn.php +++ b/framework/Data/Common/Sqlite/TSqliteTableColumn.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common.Sqlite + * @package Prado\Data\Common\Sqlite */ +namespace Prado\Data\Common\Sqlite; + /** * Load common TDbTableCommon class. */ @@ -18,7 +20,7 @@ Prado::using('System.Data.Common.TDbTableColumn'); * Describes the column metadata of the schema for a PostgreSQL database table. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common.Sqlite + * @package Prado\Data\Common\Sqlite * @since 3.1 */ class TSqliteTableColumn extends TDbTableColumn diff --git a/framework/Data/Common/Sqlite/TSqliteTableInfo.php b/framework/Data/Common/Sqlite/TSqliteTableInfo.php index e15f050a..f08c8229 100644 --- a/framework/Data/Common/Sqlite/TSqliteTableInfo.php +++ b/framework/Data/Common/Sqlite/TSqliteTableInfo.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common.Sqlite + * @package Prado\Data\Common\Sqlite */ +namespace Prado\Data\Common\Sqlite; + /** * Loads the base TDbTableInfo class and TSqliteTableColumn class. */ @@ -19,7 +21,7 @@ Prado::using('System.Data.Common.Sqlite.TSqliteTableColumn'); * TSqliteTableInfo class provides additional table information for PostgreSQL database. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common.Sqlite + * @package Prado\Data\Common\Sqlite * @since 3.1 */ class TSqliteTableInfo extends TDbTableInfo diff --git a/framework/Data/Common/TDbCommandBuilder.php b/framework/Data/Common/TDbCommandBuilder.php index 7a7b75d4..0094a964 100644 --- a/framework/Data/Common/TDbCommandBuilder.php +++ b/framework/Data/Common/TDbCommandBuilder.php @@ -6,15 +6,17 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common + * @package Prado\Data\Common */ +namespace Prado\Data\Common; + /** * TDbCommandBuilder provides basic methods to create query commands for tables * giving by {@link setTableInfo TableInfo} the property. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common + * @package Prado\Data\Common * @since 3.1 */ class TDbCommandBuilder extends TComponent diff --git a/framework/Data/Common/TDbMetaData.php b/framework/Data/Common/TDbMetaData.php index 1d07c750..a34c18bf 100644 --- a/framework/Data/Common/TDbMetaData.php +++ b/framework/Data/Common/TDbMetaData.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common + * @package Prado\Data\Common */ +namespace Prado\Data\Common; + /** * TDbMetaData is the base class for retrieving metadata information, such as * table and columns information, from a database connection. @@ -16,7 +18,7 @@ * Use the {@link getTableInfo} method to retrieve a table information. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common + * @package Prado\Data\Common * @since 3.1 */ abstract class TDbMetaData extends TComponent diff --git a/framework/Data/Common/TDbTableColumn.php b/framework/Data/Common/TDbTableColumn.php index fe96e12a..1543cd46 100644 --- a/framework/Data/Common/TDbTableColumn.php +++ b/framework/Data/Common/TDbTableColumn.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common + * @package Prado\Data\Common */ +namespace Prado\Data\Common; + /** * TDbTableColumn class describes the column meta data of the schema for a database table. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common + * @package Prado\Data\Common * @since 3.1 */ class TDbTableColumn extends TComponent diff --git a/framework/Data/Common/TDbTableInfo.php b/framework/Data/Common/TDbTableInfo.php index 5060845b..5fd6956c 100644 --- a/framework/Data/Common/TDbTableInfo.php +++ b/framework/Data/Common/TDbTableInfo.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.Common + * @package Prado\Data\Common */ +namespace Prado\Data\Common; + /** * TDbTableInfo class describes the meta data of a database table. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.Common + * @package Prado\Data\Common * @since 3.1 */ class TDbTableInfo extends TComponent diff --git a/framework/Data/DataGateway/TDataGatewayCommand.php b/framework/Data/DataGateway/TDataGatewayCommand.php index 7f92dbf5..294ae833 100644 --- a/framework/Data/DataGateway/TDataGatewayCommand.php +++ b/framework/Data/DataGateway/TDataGatewayCommand.php @@ -7,9 +7,11 @@ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ - * @package System.Data.DataGateway + * @package Prado\Data\DataGateway */ +namespace Prado\Data\DataGateway; + /** * TDataGatewayCommand is command builder and executor class for * TTableGateway and TActiveRecordGateway. @@ -31,7 +33,7 @@ * * @author Wei Zhuo <weizho[at]gmail[dot]com> * @version $Id$ - * @package System.Data.DataGateway + * @package Prado\Data\DataGateway * @since 3.1 */ class TDataGatewayCommand extends TComponent @@ -182,4 +184,273 @@ class TDataGatewayCommand extends TComponent { $index = $this->getIndexKeyCondition($this->getTableInfo(),$fields,$values); if(strlen($where = $criteria->getCondition())>0) - $criteria->setCondition("({$index}) AND ({$where}
\ No newline at end of file + $criteria->setCondition("({$index}) AND ({$where})"); + else + $criteria->setCondition($index); + $command = $this->getFindCommand($criteria); + $this->onCreateCommand($command, $criteria); + return $this->onExecuteCommand($command,$command->query()); + } + + /** + * @param array multiple primary key values or composite value arrays + * @return integer number of rows affected. + */ + public function deleteByPk($keys) + { + $where = $this->getCompositeKeyCondition((array)$keys); + $command = $this->getBuilder()->createDeleteCommand($where); + $this->onCreateCommand($command, new TSqlCriteria($where,$keys)); + $command->prepare(); + return $this->onExecuteCommand($command,$command->execute()); + } + + public function getIndexKeyCondition($table,$fields,$values) + { + if (!count($values)) + return 'FALSE'; + $columns = array(); + $tableName = $table->getTableFullName(); + foreach($fields as $field) + $columns[] = $tableName.'.'.$table->getColumn($field)->getColumnName(); + return '('.implode(', ',$columns).') IN '.$this->quoteTuple($values); + } + + /** + * Construct a "pk IN ('key1', 'key2', ...)" criteria. + * @param array values for IN predicate + * @param string SQL string for primary keys IN a list. + */ + protected function getCompositeKeyCondition($values) + { + $primary = $this->getTableInfo()->getPrimaryKeys(); + $count = count($primary); + if($count===0) + { + throw new TDbException('dbtablegateway_no_primary_key_found', + $this->getTableInfo()->getTableFullName()); + } + if(!is_array($values) || count($values) === 0) + { + throw new TDbException('dbtablegateway_missing_pk_values', + $this->getTableInfo()->getTableFullName()); + } + if($count>1 && (!isset($values[0]) || !is_array($values[0]))) + $values = array($values); + if($count > 1 && count($values[0]) !== $count) + { + throw new TDbException('dbtablegateway_pk_value_count_mismatch', + $this->getTableInfo()->getTableFullName()); + } + return $this->getIndexKeyCondition($this->getTableInfo(),$primary, $values); + } + + /** + * @param TDbConnection database connection. + * @param array values + * @return string quoted recursive tuple values, e.g. "('val1', 'val2')". + */ + protected function quoteTuple($array) + { + $conn = $this->getDbConnection(); + $data = array(); + foreach($array as $k=>$v) + $data[] = is_array($v) ? $this->quoteTuple($v) : $conn->quoteString($v); + return '('.implode(', ', $data).')'; + } + + /** + * Create the condition and parameters for find by primary. + * @param array primary key values + * @return array tuple($where, $parameters) + */ + protected function getPrimaryKeyCondition($values) + { + $primary = $this->getTableInfo()->getPrimaryKeys(); + if(count($primary)===0) + { + throw new TDbException('dbtablegateway_no_primary_key_found', + $this->getTableInfo()->getTableFullName()); + } + $criteria=array(); + $bindings=array(); + $i = 0; + foreach($primary as $key) + { + $column = $this->getTableInfo()->getColumn($key)->getColumnName(); + $criteria[] = $column.' = :'.$key; + $bindings[$key] = isset($values[$key])?$values[$key]:$values[$i++]; + } + return array(implode(' AND ', $criteria), $bindings); + } + + /** + * Find one matching records for arbituary SQL. + * @param TSqlCriteria $criteria + * @return TDbDataReader record reader. + */ + public function findBySql($criteria) + { + $command = $this->getSqlCommand($criteria); + return $this->onExecuteCommand($command, $command->queryRow()); + } + + /** + * Find zero or more matching records for arbituary SQL. + * @param TSqlCriteria $criteria + * @return TDbDataReader record reader. + */ + public function findAllBySql($criteria) + { + $command = $this->getSqlCommand($criteria); + return $this->onExecuteCommand($command, $command->query()); + } + + /** + * Build sql command from the criteria. Limit, Offset and Ordering are applied if applicable. + * @param TSqlCriteria $criteria + * @return TDbCommand command corresponding to the criteria. + */ + protected function getSqlCommand($criteria) + { + $sql = $criteria->getCondition(); + $ordering = $criteria->getOrdersBy(); + $limit = $criteria->getLimit(); + $offset = $criteria->getOffset(); + if(count($ordering) > 0) + $sql = $this->getBuilder()->applyOrdering($sql, $ordering); + if($limit>=0 || $offset>=0) + $sql = $this->getBuilder()->applyLimitOffset($sql, $limit, $offset); + $command = $this->getBuilder()->createCommand($sql); + $this->getBuilder()->bindArrayValues($command, $criteria->getParameters()->toArray()); + $this->onCreateCommand($command, $criteria); + return $command; + } + + /** + * @param TSqlCriteria $criteria + * @return integer number of records. + */ + public function count($criteria) + { + if($criteria===null) + return (int)$this->getBuilder()->createCountCommand()->queryScalar(); + $where = $criteria->getCondition(); + $parameters = $criteria->getParameters()->toArray(); + $ordering = $criteria->getOrdersBy(); + $limit = $criteria->getLimit(); + $offset = $criteria->getOffset(); + $command = $this->getBuilder()->createCountCommand($where,$parameters,$ordering,$limit,$offset); + $this->onCreateCommand($command, $criteria); + return $this->onExecuteCommand($command, (int)$command->queryScalar()); + } + + /** + * Inserts a new record into the table. Each array key must + * correspond to a column name in the table unless a null value is permitted. + * @param array new record data. + * @return mixed last insert id if one column contains a serial or sequence, + * otherwise true if command executes successfully and affected 1 or more rows. + */ + public function insert($data) + { + $command=$this->getBuilder()->createInsertCommand($data); + $this->onCreateCommand($command, new TSqlCriteria(null,$data)); + $command->prepare(); + if($this->onExecuteCommand($command, $command->execute()) > 0) + { + $value = $this->getLastInsertId(); + return $value !== null ? $value : true; + } + return false; + } + + /** + * Iterate through all the columns and returns the last insert id of the + * first column that has a sequence or serial. + * @return mixed last insert id, null if none is found. + */ + public function getLastInsertID() + { + return $this->getBuilder()->getLastInsertID(); + } + + /** + * @param string __call method name + * @param string criteria conditions + * @param array method arguments + * @return TActiveRecordCriteria criteria created from the method name and its arguments. + */ + public function createCriteriaFromString($method, $condition, $args) + { + $fields = $this->extractMatchingConditions($method, $condition); + $args=count($args) === 1 && is_array($args[0]) ? $args[0] : $args; + if(count($fields)>count($args)) + { + throw new TDbException('dbtablegateway_mismatch_args_exception', + $method,count($fields),count($args)); + } + return new TSqlCriteria(implode(' ',$fields), $args); + } + + /** + * Calculates the AND/OR condition from dynamic method substrings using + * table meta data, allows for any AND-OR combinations. + * @param string dynamic method name + * @param string dynamic method search criteria + * @return array search condition substrings + */ + protected function extractMatchingConditions($method, $condition) + { + $table = $this->getTableInfo(); + $columns = $table->getLowerCaseColumnNames(); + $regexp = '/('.implode('|', array_keys($columns)).')(and|_and_|or|_or_)?/i'; + $matches = array(); + if(!preg_match_all($regexp, strtolower($condition), $matches,PREG_SET_ORDER)) + { + throw new TDbException('dbtablegateway_mismatch_column_name', + $method, implode(', ', $columns), $table->getTableFullName()); + } + + $fields = array(); + foreach($matches as $match) + { + $key = $columns[$match[1]]; + $column = $table->getColumn($key)->getColumnName(); + $sql = $column . ' = ? '; + if(count($match) > 2) + $sql .= strtoupper(str_replace('_', '', $match[2])); + $fields[] = $sql; + } + return $fields; + } + + /** + * Raised when a command is prepared and parameter binding is completed. + * The parameter object is TDataGatewayEventParameter of which the + * {@link TDataGatewayEventParameter::getCommand Command} property can be + * inspected to obtain the sql query to be executed. + * @param TDataGatewayCommand originator $sender + * @param TDataGatewayEventParameter + */ + public function onCreateCommand($command, $criteria) + { + $this->raiseEvent('OnCreateCommand', $this, new TDataGatewayEventParameter($command,$criteria)); + } + + /** + * Raised when a command is executed and the result from the database was returned. + * The parameter object is TDataGatewayResultEventParameter of which the + * {@link TDataGatewayEventParameter::getResult Result} property contains + * the data return from the database. The data returned can be changed + * by setting the {@link TDataGatewayEventParameter::setResult Result} property. + * @param TDataGatewayCommand originator $sender + * @param TDataGatewayResultEventParameter + */ + public function onExecuteCommand($command, $result) + { + $parameter = new TDataGatewayResultEventParameter($command, $result); + $this->raiseEvent('OnExecuteCommand', $this, $parameter); + return $parameter->getResult(); + } +}
\ No newline at end of file diff --git a/framework/Data/DataGateway/TDataGatewayEventParameter.php b/framework/Data/DataGateway/TDataGatewayEventParameter.php deleted file mode 100644 index f6fcc3f2..00000000 --- a/framework/Data/DataGateway/TDataGatewayEventParameter.php +++ /dev/null @@ -1,319 +0,0 @@ -<?php -/** - * TDataGatewayCommand, TDataGatewayEventParameter and TDataGatewayResultEventParameter class file. - * - * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @link http://www.pradosoft.com/ - * @copyright Copyright © 2005-2014 PradoSoft - * @license http://www.pradosoft.com/license/ - * @version $Id$ - * @package System.Data.DataGateway - */)"); - else - $criteria->setCondition($index); - $command = $this->getFindCommand($criteria); - $this->onCreateCommand($command, $criteria); - return $this->onExecuteCommand($command,$command->query()); - } - - /** - * @param array multiple primary key values or composite value arrays - * @return integer number of rows affected. - */ - public function deleteByPk($keys) - { - $where = $this->getCompositeKeyCondition((array)$keys); - $command = $this->getBuilder()->createDeleteCommand($where); - $this->onCreateCommand($command, new TSqlCriteria($where,$keys)); - $command->prepare(); - return $this->onExecuteCommand($command,$command->execute()); - } - - public function getIndexKeyCondition($table,$fields,$values) - { - if (!count($values)) - return 'FALSE'; - $columns = array(); - $tableName = $table->getTableFullName(); - foreach($fields as $field) - $columns[] = $tableName.'.'.$table->getColumn($field)->getColumnName(); - return '('.implode(', ',$columns).') IN '.$this->quoteTuple($values); - } - - /** - * Construct a "pk IN ('key1', 'key2', ...)" criteria. - * @param array values for IN predicate - * @param string SQL string for primary keys IN a list. - */ - protected function getCompositeKeyCondition($values) - { - $primary = $this->getTableInfo()->getPrimaryKeys(); - $count = count($primary); - if($count===0) - { - throw new TDbException('dbtablegateway_no_primary_key_found', - $this->getTableInfo()->getTableFullName()); - } - if(!is_array($values) || count($values) === 0) - { - throw new TDbException('dbtablegateway_missing_pk_values', - $this->getTableInfo()->getTableFullName()); - } - if($count>1 && (!isset($values[0]) || !is_array($values[0]))) - $values = array($values); - if($count > 1 && count($values[0]) !== $count) - { - throw new TDbException('dbtablegateway_pk_value_count_mismatch', - $this->getTableInfo()->getTableFullName()); - } - return $this->getIndexKeyCondition($this->getTableInfo(),$primary, $values); - } - - /** - * @param TDbConnection database connection. - * @param array values - * @return string quoted recursive tuple values, e.g. "('val1', 'val2')". - */ - protected function quoteTuple($array) - { - $conn = $this->getDbConnection(); - $data = array(); - foreach($array as $k=>$v) - $data[] = is_array($v) ? $this->quoteTuple($v) : $conn->quoteString($v); - return '('.implode(', ', $data).')'; - } - - /** - * Create the condition and parameters for find by primary. - * @param array primary key values - * @return array tuple($where, $parameters) - */ - protected function getPrimaryKeyCondition($values) - { - $primary = $this->getTableInfo()->getPrimaryKeys(); - if(count($primary)===0) - { - throw new TDbException('dbtablegateway_no_primary_key_found', - $this->getTableInfo()->getTableFullName()); - } - $criteria=array(); - $bindings=array(); - $i = 0; - foreach($primary as $key) - { - $column = $this->getTableInfo()->getColumn($key)->getColumnName(); - $criteria[] = $column.' = :'.$key; - $bindings[$key] = isset($values[$key])?$values[$key]:$values[$i++]; - } - return array(implode(' AND ', $criteria), $bindings); - } - - /** - * Find one matching records for arbituary SQL. - * @param TSqlCriteria $criteria - * @return TDbDataReader record reader. - */ - public function findBySql($criteria) - { - $command = $this->getSqlCommand($criteria); - return $this->onExecuteCommand($command, $command->queryRow()); - } - - /** - * Find zero or more matching records for arbituary SQL. - * @param TSqlCriteria $criteria - * @return TDbDataReader record reader. - */ - public function findAllBySql($criteria) - { - $command = $this->getSqlCommand($criteria); - return $this->onExecuteCommand($command, $command->query()); - } - - /** - * Build sql command from the criteria. Limit, Offset and Ordering are applied if applicable. - * @param TSqlCriteria $criteria - * @return TDbCommand command corresponding to the criteria. - */ - protected function getSqlCommand($criteria) - { - $sql = $criteria->getCondition(); - $ordering = $criteria->getOrdersBy(); - $limit = $criteria->getLimit(); - $offset = $criteria->getOffset(); - if(count($ordering) > 0) - $sql = $this->getBuilder()->applyOrdering($sql, $ordering); - if($limit>=0 || $offset>=0) - $sql = $this->getBuilder()->applyLimitOffset($sql, $limit, $offset); - $command = $this->getBuilder()->createCommand($sql); - $this->getBuilder()->bindArrayValues($command, $criteria->getParameters()->toArray()); - $this->onCreateCommand($command, $criteria); - return $command; - } - - /** - * @param TSqlCriteria $criteria - * @return integer number of records. - */ - public function count($criteria) - { - if($criteria===null) - return (int)$this->getBuilder()->createCountCommand()->queryScalar(); - $where = $criteria->getCondition(); - $parameters = $criteria->getParameters()->toArray(); - $ordering = $criteria->getOrdersBy(); - $limit = $criteria->getLimit(); - $offset = $criteria->getOffset(); - $command = $this->getBuilder()->createCountCommand($where,$parameters,$ordering,$limit,$offset); - $this->onCreateCommand($command, $criteria); - return $this->onExecuteCommand($command, (int)$command->queryScalar()); - } - - /** - * Inserts a new record into the table. Each array key must - * correspond to a column name in the table unless a null value is permitted. - * @param array new record data. - * @return mixed last insert id if one column contains a serial or sequence, - * otherwise true if command executes successfully and affected 1 or more rows. - */ - public function insert($data) - { - $command=$this->getBuilder()->createInsertCommand($data); - $this->onCreateCommand($command, new TSqlCriteria(null,$data)); - $command->prepare(); - if($this->onExecuteCommand($command, $command->execute()) > 0) - { - $value = $this->getLastInsertId(); - return $value !== null ? $value : true; - } - return false; - } - - /** - * Iterate through all the columns and returns the last insert id of the - * first column that has a sequence or serial. - * @return mixed last insert id, null if none is found. - */ - public function getLastInsertID() - { - return $this->getBuilder()->getLastInsertID(); - } - - /** - * @param string __call method name - * @param string criteria conditions - * @param array method arguments - * @return TActiveRecordCriteria criteria created from the method name and its arguments. - */ - public function createCriteriaFromString($method, $condition, $args) - { - $fields = $this->extractMatchingConditions($method, $condition); - $args=count($args) === 1 && is_array($args[0]) ? $args[0] : $args; - if(count($fields)>count($args)) - { - throw new TDbException('dbtablegateway_mismatch_args_exception', - $method,count($fields),count($args)); - } - return new TSqlCriteria(implode(' ',$fields), $args); - } - - /** - * Calculates the AND/OR condition from dynamic method substrings using - * table meta data, allows for any AND-OR combinations. - * @param string dynamic method name - * @param string dynamic method search criteria - * @return array search condition substrings - */ - protected function extractMatchingConditions($method, $condition) - { - $table = $this->getTableInfo(); - $columns = $table->getLowerCaseColumnNames(); - $regexp = '/('.implode('|', array_keys($columns)).')(and|_and_|or|_or_)?/i'; - $matches = array(); - if(!preg_match_all($regexp, strtolower($condition), $matches,PREG_SET_ORDER)) - { - throw new TDbException('dbtablegateway_mismatch_column_name', - $method, implode(', ', $columns), $table->getTableFullName()); - } - - $fields = array(); - foreach($matches as $match) - { - $key = $columns[$match[1]]; - $column = $table->getColumn($key)->getColumnName(); - $sql = $column . ' = ? '; - if(count($match) > 2) - $sql .= strtoupper(str_replace('_', '', $match[2])); - $fields[] = $sql; - } - return $fields; - } - - /** - * Raised when a command is prepared and parameter binding is completed. - * The parameter object is TDataGatewayEventParameter of which the - * {@link TDataGatewayEventParameter::getCommand Command} property can be - * inspected to obtain the sql query to be executed. - * @param TDataGatewayCommand originator $sender - * @param TDataGatewayEventParameter - */ - public function onCreateCommand($command, $criteria) - { - $this->raiseEvent('OnCreateCommand', $this, new TDataGatewayEventParameter($command,$criteria)); - } - - /** - * Raised when a command is executed and the result from the database was returned. - * The parameter object is TDataGatewayResultEventParameter of which the - * {@link TDataGatewayEventParameter::getResult Result} property contains - * the data return from the database. The data returned can be changed - * by setting the {@link TDataGatewayEventParameter::setResult Result} property. - * @param TDataGatewayCommand originator $sender - * @param TDataGatewayResultEventParameter - */ - public function onExecuteCommand($command, $result) - { - $parameter = new TDataGatewayResultEventParameter($command, $result); - $this->raiseEvent('OnExecuteCommand', $this, $parameter); - return $parameter->getResult(); - } -} - -/** - * TDataGatewayEventParameter class contains the TDbCommand to be executed as - * well as the criteria object. - * - * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @version $Id$ - * @package System.Data.DataGateway - * @since 3.1 - */ -class TDataGatewayEventParameter extends TEventParameter -{ - private $_command; - private $_criteria; - - public function __construct($command,$criteria) - { - $this->_command=$command; - $this->_criteria=$criteria; - } - - /** - * The database command to be executed. Do not rebind the parameters or change - * the sql query string. - * @return TDbCommand command to be executed. - */ - public function getCommand() - { - return $this->_command; - } - - /** - * @return TSqlCriteria criteria used to bind the sql query parameters. - */ - public function getCriteria() - { - return $this->_criteria; - } -}
\ No newline at end of file diff --git a/framework/Data/DataGateway/TDataGatewayResultEventParameter.php b/framework/Data/DataGateway/TDataGatewayResultEventParameter.php index 004ab2d8..b5bddfa4 100644 --- a/framework/Data/DataGateway/TDataGatewayResultEventParameter.php +++ b/framework/Data/DataGateway/TDataGatewayResultEventParameter.php @@ -7,9 +7,11 @@ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ - * @package System.Data.DataGateway + * @package Prado\Data\DataGateway */ +namespace Prado\Data\DataGateway; + /** * TDataGatewayResultEventParameter contains the TDbCommand executed and the resulting * data returned from the database. The data can be changed by changing the @@ -17,7 +19,7 @@ * * @author Wei Zhuo <weizho[at]gmail[dot]com> * @version $Id$ - * @package System.Data.DataGateway + * @package Prado\Data\DataGateway * @since 3.1 */ class TDataGatewayResultEventParameter extends TEventParameter diff --git a/framework/Data/DataGateway/TSqlCriteria.php b/framework/Data/DataGateway/TSqlCriteria.php index bc1bbbbb..f86b18dd 100644 --- a/framework/Data/DataGateway/TSqlCriteria.php +++ b/framework/Data/DataGateway/TSqlCriteria.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.DataGateway + * @package Prado\Data\DataGateway */ +namespace Prado\Data\DataGateway; + /** * Search criteria for TDbDataGateway. * @@ -24,7 +26,7 @@ * </code> * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.DataGateway + * @package Prado\Data\DataGateway * @since 3.1 */ class TSqlCriteria extends TComponent diff --git a/framework/Data/DataGateway/TTableGateway.php b/framework/Data/DataGateway/TTableGateway.php index b527fbb4..fb9dfd78 100644 --- a/framework/Data/DataGateway/TTableGateway.php +++ b/framework/Data/DataGateway/TTableGateway.php @@ -7,9 +7,11 @@ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ * @version $Id$ - * @package System.Data.DataGateway + * @package Prado\Data\DataGateway */ +namespace Prado\Data\DataGateway; + /** * Loads the data gateway command builder and sql criteria. */ @@ -73,7 +75,7 @@ Prado::using('System.Data.DataGateway.TDataGatewayCommand'); * * @author Wei Zhuo <weizho[at]gmail[dot]com> * @version $Id$ - * @package System.Data.DataGateway + * @package Prado\Data\DataGateway * @since 3.1 */ class TTableGateway extends TComponent diff --git a/framework/Data/SqlMap/Configuration/TDiscriminator.php b/framework/Data/SqlMap/Configuration/TDiscriminator.php index 1c7f679f..100e1816 100644 --- a/framework/Data/SqlMap/Configuration/TDiscriminator.php +++ b/framework/Data/SqlMap/Configuration/TDiscriminator.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + /** * The TDiscriminator corresponds to the <discriminator> tag within a <resultMap>. * @@ -20,7 +22,7 @@ * the object data. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration * @since 3.1 */ class TDiscriminator extends TComponent diff --git a/framework/Data/SqlMap/Configuration/TInlineParameterMapParser.php b/framework/Data/SqlMap/Configuration/TInlineParameterMapParser.php index e8977b0d..26475901 100644 --- a/framework/Data/SqlMap/Configuration/TInlineParameterMapParser.php +++ b/framework/Data/SqlMap/Configuration/TInlineParameterMapParser.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + /** * TInlineParameterMapParser class. * @@ -17,7 +19,7 @@ * parametrized SQL statement. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration * @since 3.1 */ class TInlineParameterMapParser diff --git a/framework/Data/SqlMap/Configuration/TParameterMap.php b/framework/Data/SqlMap/Configuration/TParameterMap.php index 2eaad9a3..08ca6471 100644 --- a/framework/Data/SqlMap/Configuration/TParameterMap.php +++ b/framework/Data/SqlMap/Configuration/TParameterMap.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + /** * TParameterMap corresponds to the <parameterMap> element. * @@ -25,7 +27,7 @@ * The <parameterMap> element accepts two attributes: id (required) and extends (optional). * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration * @since 3.1 */ class TParameterMap extends TComponent diff --git a/framework/Data/SqlMap/Configuration/TParameterProperty.php b/framework/Data/SqlMap/Configuration/TParameterProperty.php index 84007a28..d691d1f9 100644 --- a/framework/Data/SqlMap/Configuration/TParameterProperty.php +++ b/framework/Data/SqlMap/Configuration/TParameterProperty.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + /** * TParameterProperty corresponds to the <property> tag and defines * one object property for the <parameterMap> @@ -24,7 +26,7 @@ * will be written to the database instead of the value. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration * @since 3.1 */ class TParameterProperty extends TComponent diff --git a/framework/Data/SqlMap/Configuration/TResultMap.php b/framework/Data/SqlMap/Configuration/TResultMap.php index e35faf28..d4707c5d 100644 --- a/framework/Data/SqlMap/Configuration/TResultMap.php +++ b/framework/Data/SqlMap/Configuration/TResultMap.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + /** * TResultMap corresponds to <resultMap> mapping tag. * @@ -31,7 +33,7 @@ * from the "parent" <resultMap> are set before any values specified by this <resultMap>. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration * @since 3.1 */ class TResultMap extends TComponent diff --git a/framework/Data/SqlMap/Configuration/TResultProperty.php b/framework/Data/SqlMap/Configuration/TResultProperty.php index 796060ae..2404d2c9 100644 --- a/framework/Data/SqlMap/Configuration/TResultProperty.php +++ b/framework/Data/SqlMap/Configuration/TResultProperty.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + /** * TResultProperty corresponds a <property> tags inside a <resultMap> tag. * @@ -28,7 +30,7 @@ * with the {@link Select setSelect()} . * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration * @since 3.1 */ class TResultProperty extends TComponent diff --git a/framework/Data/SqlMap/Configuration/TSimpleDynamicParser.php b/framework/Data/SqlMap/Configuration/TSimpleDynamicParser.php index 29260036..e9fd5ad5 100644 --- a/framework/Data/SqlMap/Configuration/TSimpleDynamicParser.php +++ b/framework/Data/SqlMap/Configuration/TSimpleDynamicParser.php @@ -6,15 +6,17 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + /** * TSimpleDynamicParser finds place holders $name$ in the sql text and replaces * it with a TSimpleDynamicParser::DYNAMIC_TOKEN. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration * @since 3.1 */ class TSimpleDynamicParser diff --git a/framework/Data/SqlMap/Configuration/TSqlMapCacheKey.php b/framework/Data/SqlMap/Configuration/TSqlMapCacheKey.php index 095f24d4..20ec6a0b 100644 --- a/framework/Data/SqlMap/Configuration/TSqlMapCacheKey.php +++ b/framework/Data/SqlMap/Configuration/TSqlMapCacheKey.php @@ -6,16 +6,18 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + /** * TSqlMapCacheKey class. * * Provides a hash of the object to be cached. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration * @since 3.1 */ class TSqlMapCacheKey diff --git a/framework/Data/SqlMap/Configuration/TSqlMapCacheModel.php b/framework/Data/SqlMap/Configuration/TSqlMapCacheModel.php index 0021cad8..8f1aed63 100644 --- a/framework/Data/SqlMap/Configuration/TSqlMapCacheModel.php +++ b/framework/Data/SqlMap/Configuration/TSqlMapCacheModel.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + /** * TSqlMapCacheModel corresponds to the <cacheModel> sql mapping configuration tag. * @@ -27,7 +29,7 @@ * the current request. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration * @since 3.1 */ class TSqlMapCacheModel extends TComponent diff --git a/framework/Data/SqlMap/Configuration/TSqlMapCacheTypes.php b/framework/Data/SqlMap/Configuration/TSqlMapCacheTypes.php index c252151c..40eec553 100644 --- a/framework/Data/SqlMap/Configuration/TSqlMapCacheTypes.php +++ b/framework/Data/SqlMap/Configuration/TSqlMapCacheTypes.php @@ -6,16 +6,18 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + /** * TSqlMapCacheTypes enumerable class. * * Implemented cache are 'Basic', 'FIFO' and 'LRU'. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration * @since 3.1 */ class TSqlMapCacheTypes extends TEnumerable diff --git a/framework/Data/SqlMap/Configuration/TSqlMapDelete.php b/framework/Data/SqlMap/Configuration/TSqlMapDelete.php index 90e1ab21..ddd0b55f 100644 --- a/framework/Data/SqlMap/Configuration/TSqlMapDelete.php +++ b/framework/Data/SqlMap/Configuration/TSqlMapDelete.php @@ -7,14 +7,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + /** * TSqlMapDelete class corresponds to the <delete> element. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration * @since 3.1 */ class TSqlMapDelete extends TSqlMapUpdate diff --git a/framework/Data/SqlMap/Configuration/TSqlMapInsert.php b/framework/Data/SqlMap/Configuration/TSqlMapInsert.php index f269386f..8b1b36c4 100644 --- a/framework/Data/SqlMap/Configuration/TSqlMapInsert.php +++ b/framework/Data/SqlMap/Configuration/TSqlMapInsert.php @@ -7,9 +7,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + /** * TSqlMapInsert class corresponds to the <insert> element. * @@ -17,7 +19,7 @@ * to generate a key to be used for the insert command. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration * @since 3.1 */ class TSqlMapInsert extends TSqlMapStatement diff --git a/framework/Data/SqlMap/Configuration/TSqlMapSelect.php b/framework/Data/SqlMap/Configuration/TSqlMapSelect.php index 098be9fb..64713af9 100644 --- a/framework/Data/SqlMap/Configuration/TSqlMapSelect.php +++ b/framework/Data/SqlMap/Configuration/TSqlMapSelect.php @@ -7,14 +7,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + /** * TSqlMapSelect class file. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements * @since 3.1 */ class TSqlMapSelect extends TSqlMapStatement diff --git a/framework/Data/SqlMap/Configuration/TSqlMapSelectKey.php b/framework/Data/SqlMap/Configuration/TSqlMapSelectKey.php index 51299097..89afe545 100644 --- a/framework/Data/SqlMap/Configuration/TSqlMapSelectKey.php +++ b/framework/Data/SqlMap/Configuration/TSqlMapSelectKey.php @@ -7,14 +7,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + /** * TSqlMapSelect corresponds to the <selectKey> element. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration * @since 3.1 */ class TSqlMapSelectKey extends TSqlMapStatement diff --git a/framework/Data/SqlMap/Configuration/TSqlMapStatement.php b/framework/Data/SqlMap/Configuration/TSqlMapStatement.php index 3477e9cf..b631e1b0 100644 --- a/framework/Data/SqlMap/Configuration/TSqlMapStatement.php +++ b/framework/Data/SqlMap/Configuration/TSqlMapStatement.php @@ -7,9 +7,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + /** * TSqlMapStatement class corresponds to <statement> element. * @@ -23,7 +25,7 @@ * statement can return a database-generated key.) * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration * @since 3.1 */ class TSqlMapStatement extends TComponent diff --git a/framework/Data/SqlMap/Configuration/TSqlMapUpdate.php b/framework/Data/SqlMap/Configuration/TSqlMapUpdate.php index 853e7e2a..6daf790b 100644 --- a/framework/Data/SqlMap/Configuration/TSqlMapUpdate.php +++ b/framework/Data/SqlMap/Configuration/TSqlMapUpdate.php @@ -7,14 +7,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + /** * TSqlMapUpdate class corresponds to <update> element. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration * @since 3.1 */ class TSqlMapUpdate extends TSqlMapStatement diff --git a/framework/Data/SqlMap/Configuration/TSqlMapXmlConfigBuilder.php b/framework/Data/SqlMap/Configuration/TSqlMapXmlConfigBuilder.php index 47982fca..b74340bd 100644 --- a/framework/Data/SqlMap/Configuration/TSqlMapXmlConfigBuilder.php +++ b/framework/Data/SqlMap/Configuration/TSqlMapXmlConfigBuilder.php @@ -6,16 +6,18 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + Prado::using('System.Data.SqlMap.Configuration.TSqlMapStatement'); /** * TSqlMapXmlConfig class file. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ abstract class TSqlMapXmlConfigBuilder { @@ -36,7 +38,6 @@ abstract class TSqlMapXmlConfigBuilder throw new TSqlMapConfigurationException( 'sqlmap_node_class_undef', $node, $this->getConfigFile()); } - /** * For each attributes (excluding attribute named in $except) set the * property of the $obj given by the name of the attribute with the value @@ -60,7 +61,6 @@ abstract class TSqlMapXmlConfigBuilder } } } - /** * Gets the filename relative to the basefile. * @param string base filename @@ -79,7 +79,6 @@ abstract class TSqlMapXmlConfigBuilder throw new TSqlMapConfigurationException( 'sqlmap_unable_to_find_resource', $resource); } - /** * Load document using simple xml. * @param string filename. @@ -89,13 +88,11 @@ abstract class TSqlMapXmlConfigBuilder { if( strpos($filename, '${') !== false) $filename = $config->replaceProperties($filename); - if(!is_file($filename)) throw new TSqlMapConfigurationException( 'sqlmap_unable_to_find_config', $filename); return simplexml_load_string($config->replaceProperties(file_get_contents($filename))); } - /** * Get element node by ID value (try for attribute name ID as case insensitive). * @param SimpleXmlDocument $document @@ -108,4 +105,13 @@ abstract class TSqlMapXmlConfigBuilder //hack to allow upper case and lower case attribute names. foreach(array('id','ID','Id', 'iD') as $id) { - $xpath = "//{$tag}[@{$id}='{$value}
\ No newline at end of file + $xpath = "//{$tag}[@{$id}='{$value}']"; + foreach($document->xpath($xpath) as $node) + return $node; + } + } + /** + * @return string configuration file. + */ + protected abstract function getConfigFile(); +}
\ No newline at end of file diff --git a/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php b/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php index bd2070bb..91d9cbb3 100644 --- a/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php +++ b/framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php @@ -6,18 +6,10 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration - */']"; - foreach($document->xpath($xpath) as $node) - return $node; - } - } + * @package Prado\Data\SqlMap\Configuration + */ - /** - * @return string configuration file. - */ - protected abstract function getConfigFile(); -} +namespace Prado\Data\SqlMap\Configuration; /** * TSqlMapXmlConfig class. @@ -25,7 +17,7 @@ * Configures the TSqlMapManager using xml configuration file. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration * @since 3.1 */ class TSqlMapXmlConfiguration extends TSqlMapXmlConfigBuilder diff --git a/framework/Data/SqlMap/Configuration/TSqlMapXmlMappingConfiguration.php b/framework/Data/SqlMap/Configuration/TSqlMapXmlMappingConfiguration.php index d677f6cd..ae2a454e 100644 --- a/framework/Data/SqlMap/Configuration/TSqlMapXmlMappingConfiguration.php +++ b/framework/Data/SqlMap/Configuration/TSqlMapXmlMappingConfiguration.php @@ -6,16 +6,18 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + /** * Loads the statements, result maps, parameters maps from xml configuration. * * description * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration * @since 3.1 */ class TSqlMapXmlMappingConfiguration extends TSqlMapXmlConfigBuilder diff --git a/framework/Data/SqlMap/Configuration/TSubMap.php b/framework/Data/SqlMap/Configuration/TSubMap.php index 0a2e7614..c8ec3d64 100644 --- a/framework/Data/SqlMap/Configuration/TSubMap.php +++ b/framework/Data/SqlMap/Configuration/TSubMap.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration */ +namespace Prado\Data\SqlMap\Configuration; + /** * TSubMap class defines a submapping value and the corresponding <resultMap> * @@ -18,7 +20,7 @@ * is used inplace of the current result map. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Configuration + * @package Prado\Data\SqlMap\Configuration * @since 3.1 */ class TSubMap extends TComponent diff --git a/framework/Data/SqlMap/DataMapper/TFastSqlMapApplicationCache.php b/framework/Data/SqlMap/DataMapper/TFastSqlMapApplicationCache.php index d2e3d014..d9e78c12 100644 --- a/framework/Data/SqlMap/DataMapper/TFastSqlMapApplicationCache.php +++ b/framework/Data/SqlMap/DataMapper/TFastSqlMapApplicationCache.php @@ -6,16 +6,18 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper */ +namespace Prado\Data\SqlMap\DataMapper; + /** * TFastSqlMapApplicationCache class file * * Fast SqlMap result cache class with minimal-concurrency get/set and atomic flush operations * * @author Berczi Gabor <gabor.berczi@devworx.hu> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.2 */ diff --git a/framework/Data/SqlMap/DataMapper/TInvalidPropertyException.php b/framework/Data/SqlMap/DataMapper/TInvalidPropertyException.php index 2defaf0f..277af3a8 100644 --- a/framework/Data/SqlMap/DataMapper/TInvalidPropertyException.php +++ b/framework/Data/SqlMap/DataMapper/TInvalidPropertyException.php @@ -3,15 +3,17 @@ * TSqlMapException is the base exception class for all SqlMap exceptions. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ +namespace Prado\Data\SqlMap\DataMapper; + /** * TInvalidPropertyException, raised when setting or getting an invalid property. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ class TInvalidPropertyException extends TSqlMapException diff --git a/framework/Data/SqlMap/DataMapper/TLazyLoadList.php b/framework/Data/SqlMap/DataMapper/TLazyLoadList.php index e0601e44..cc893053 100644 --- a/framework/Data/SqlMap/DataMapper/TLazyLoadList.php +++ b/framework/Data/SqlMap/DataMapper/TLazyLoadList.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper */ +namespace Prado\Data\SqlMap\DataMapper; + /** * TLazyLoadList executes mapped statements when the proxy collection is first accessed. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ class TLazyLoadList diff --git a/framework/Data/SqlMap/DataMapper/TObjectProxy.php b/framework/Data/SqlMap/DataMapper/TObjectProxy.php index 957c8a8f..b31fb30d 100644 --- a/framework/Data/SqlMap/DataMapper/TObjectProxy.php +++ b/framework/Data/SqlMap/DataMapper/TObjectProxy.php @@ -6,15 +6,17 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper */ +namespace Prado\Data\SqlMap\DataMapper; + /** * TObjectProxy sets up a simple object that intercepts method calls to a * particular object and relays the call to handler object. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ class TObjectProxy diff --git a/framework/Data/SqlMap/DataMapper/TPropertyAccess.php b/framework/Data/SqlMap/DataMapper/TPropertyAccess.php index c19b77ab..d5956d9d 100644 --- a/framework/Data/SqlMap/DataMapper/TPropertyAccess.php +++ b/framework/Data/SqlMap/DataMapper/TPropertyAccess.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper */ +namespace Prado\Data\SqlMap\DataMapper; + /** * TPropertyAccess class provides dot notation stype property access and setting. * @@ -36,7 +38,7 @@ * </code> * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ class TPropertyAccess diff --git a/framework/Data/SqlMap/DataMapper/TSqlMapApplicationCache.php b/framework/Data/SqlMap/DataMapper/TSqlMapApplicationCache.php index bb3cb6c0..0c52335f 100644 --- a/framework/Data/SqlMap/DataMapper/TSqlMapApplicationCache.php +++ b/framework/Data/SqlMap/DataMapper/TSqlMapApplicationCache.php @@ -6,15 +6,17 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper */ +namespace Prado\Data\SqlMap\DataMapper; + /** * TSqlMapApplicationCache uses the default Prado application cache for * caching SqlMap results. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ class TSqlMapApplicationCache implements ICache diff --git a/framework/Data/SqlMap/DataMapper/TSqlMapCache.php b/framework/Data/SqlMap/DataMapper/TSqlMapCache.php index 33a270cd..426126ad 100644 --- a/framework/Data/SqlMap/DataMapper/TSqlMapCache.php +++ b/framework/Data/SqlMap/DataMapper/TSqlMapCache.php @@ -6,16 +6,18 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper */ +namespace Prado\Data\SqlMap\DataMapper; + /** * Allow different implementation of caching strategy. See <tt>TSqlMapFifoCache</tt> * for a first-in-first-out implementation. See <tt>TSqlMapLruCache</tt> for * a least-recently-used cache implementation. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ abstract class TSqlMapCache implements ICache diff --git a/framework/Data/SqlMap/DataMapper/TSqlMapConfigurationException.php b/framework/Data/SqlMap/DataMapper/TSqlMapConfigurationException.php index 8d5556c8..b2aab3f3 100644 --- a/framework/Data/SqlMap/DataMapper/TSqlMapConfigurationException.php +++ b/framework/Data/SqlMap/DataMapper/TSqlMapConfigurationException.php @@ -3,15 +3,17 @@ * TSqlMapException is the base exception class for all SqlMap exceptions. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ +namespace Prado\Data\SqlMap\DataMapper; + /** * TSqlMapConfigurationException, raised during configuration file parsing. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ class TSqlMapConfigurationException extends TSqlMapException diff --git a/framework/Data/SqlMap/DataMapper/TSqlMapDuplicateException.php b/framework/Data/SqlMap/DataMapper/TSqlMapDuplicateException.php index 008d8f08..292d89de 100644 --- a/framework/Data/SqlMap/DataMapper/TSqlMapDuplicateException.php +++ b/framework/Data/SqlMap/DataMapper/TSqlMapDuplicateException.php @@ -3,15 +3,17 @@ * TSqlMapException is the base exception class for all SqlMap exceptions. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ +namespace Prado\Data\SqlMap\DataMapper; + /** * TSqlMapDuplicateException, raised when a duplicate mapped statement is found. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ class TSqlMapDuplicateException extends TSqlMapException diff --git a/framework/Data/SqlMap/DataMapper/TSqlMapException.php b/framework/Data/SqlMap/DataMapper/TSqlMapException.php index 720ee7ee..0452237a 100644 --- a/framework/Data/SqlMap/DataMapper/TSqlMapException.php +++ b/framework/Data/SqlMap/DataMapper/TSqlMapException.php @@ -1,9 +1,12 @@ <?php + +namespace Prado\Data\SqlMap\DataMapper; + /** * TSqlMapException is the base exception class for all SqlMap exceptions. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ diff --git a/framework/Data/SqlMap/DataMapper/TSqlMapExecutionException.php b/framework/Data/SqlMap/DataMapper/TSqlMapExecutionException.php index 90896c35..93fcbd65 100644 --- a/framework/Data/SqlMap/DataMapper/TSqlMapExecutionException.php +++ b/framework/Data/SqlMap/DataMapper/TSqlMapExecutionException.php @@ -1,9 +1,12 @@ <?php + +namespace Prado\Data\SqlMap\DataMapper; + /** * TSqlMapException is the base exception class for all SqlMap exceptions. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ diff --git a/framework/Data/SqlMap/DataMapper/TSqlMapFifoCache.php b/framework/Data/SqlMap/DataMapper/TSqlMapFifoCache.php index 3c036a97..75d0f6f0 100644 --- a/framework/Data/SqlMap/DataMapper/TSqlMapFifoCache.php +++ b/framework/Data/SqlMap/DataMapper/TSqlMapFifoCache.php @@ -1,4 +1,7 @@ <?php + +namespace Prado\Data\SqlMap\DataMapper; + /** * TSqlMapCache class file contains FIFO, LRU, and GLOBAL cache implementations. * @@ -6,7 +9,7 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper */ /** @@ -14,7 +17,7 @@ * object that was first added when the cache is full. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ class TSqlMapFifoCache extends TSqlMapCache diff --git a/framework/Data/SqlMap/DataMapper/TSqlMapLruCache.php b/framework/Data/SqlMap/DataMapper/TSqlMapLruCache.php index e34cad84..073ad1a8 100644 --- a/framework/Data/SqlMap/DataMapper/TSqlMapLruCache.php +++ b/framework/Data/SqlMap/DataMapper/TSqlMapLruCache.php @@ -1,4 +1,7 @@ <?php + +namespace Prado\Data\SqlMap\DataMapper; + /** * TSqlMapCache class file contains FIFO, LRU, and GLOBAL cache implementations. * @@ -6,7 +9,7 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper */ /** @@ -14,7 +17,7 @@ * object that was accessed last when the cache is full. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ class TSqlMapLruCache extends TSqlMapCache diff --git a/framework/Data/SqlMap/DataMapper/TSqlMapPagedList.php b/framework/Data/SqlMap/DataMapper/TSqlMapPagedList.php index d789471d..9dad8d24 100644 --- a/framework/Data/SqlMap/DataMapper/TSqlMapPagedList.php +++ b/framework/Data/SqlMap/DataMapper/TSqlMapPagedList.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper */ +namespace Prado\Data\SqlMap\DataMapper; + Prado::using('System.Collections.TPagedList'); /** @@ -22,7 +24,7 @@ Prado::using('System.Collections.TPagedList'); * The paged list does not need to know about the total number of records. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ class TSqlMapPagedList extends TPagedList diff --git a/framework/Data/SqlMap/DataMapper/TSqlMapTypeHandler.php b/framework/Data/SqlMap/DataMapper/TSqlMapTypeHandler.php index a5d3f39c..1c5c33bf 100644 --- a/framework/Data/SqlMap/DataMapper/TSqlMapTypeHandler.php +++ b/framework/Data/SqlMap/DataMapper/TSqlMapTypeHandler.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper */ +namespace Prado\Data\SqlMap\DataMapper; + /** * A simple interface for implementing custom type handlers. * @@ -23,7 +25,7 @@ * booleans using "Y" and "N" instead of the more typical 0/1. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ abstract class TSqlMapTypeHandler extends TComponent diff --git a/framework/Data/SqlMap/DataMapper/TSqlMapTypeHandlerRegistry.php b/framework/Data/SqlMap/DataMapper/TSqlMapTypeHandlerRegistry.php index f6a22ee1..d3c3bd81 100644 --- a/framework/Data/SqlMap/DataMapper/TSqlMapTypeHandlerRegistry.php +++ b/framework/Data/SqlMap/DataMapper/TSqlMapTypeHandlerRegistry.php @@ -6,15 +6,17 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper */ +namespace Prado\Data\SqlMap\DataMapper; + /** * TTypeHandlerFactory provides type handler classes to convert database field type * to PHP types and vice versa. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ class TSqlMapTypeHandlerRegistry diff --git a/framework/Data/SqlMap/DataMapper/TSqlMapUndefinedException.php b/framework/Data/SqlMap/DataMapper/TSqlMapUndefinedException.php index 44e968ec..d5b22c1f 100644 --- a/framework/Data/SqlMap/DataMapper/TSqlMapUndefinedException.php +++ b/framework/Data/SqlMap/DataMapper/TSqlMapUndefinedException.php @@ -3,15 +3,17 @@ * TSqlMapException is the base exception class for all SqlMap exceptions. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ +namespace Prado\Data\SqlMap\DataMapper; + /** * TSqlMapUndefinedException, raised when mapped statemented are undefined. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap\DataMapper * @since 3.1 */ class TSqlMapUndefinedException extends TSqlMapException diff --git a/framework/Data/SqlMap/Statements/IMappedStatement.php b/framework/Data/SqlMap/Statements/IMappedStatement.php index 859d2ee3..12054bae 100644 --- a/framework/Data/SqlMap/Statements/IMappedStatement.php +++ b/framework/Data/SqlMap/Statements/IMappedStatement.php @@ -3,14 +3,16 @@ * IMappedStatement interface file. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements */ +namespace Prado\Data\SqlMap\Statements; + /** * Interface for all mapping statements. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements * @since 3.1 */ interface IMappedStatement diff --git a/framework/Data/SqlMap/Statements/TCachingStatement.php b/framework/Data/SqlMap/Statements/TCachingStatement.php index ad22b84f..32dde2e7 100644 --- a/framework/Data/SqlMap/Statements/TCachingStatement.php +++ b/framework/Data/SqlMap/Statements/TCachingStatement.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements */ +namespace Prado\Data\SqlMap\Statements; + /** * TCacheingStatement class. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements * @since 3.1 */ class TCachingStatement extends TComponent implements IMappedStatement diff --git a/framework/Data/SqlMap/Statements/TDeleteMappedStatement.php b/framework/Data/SqlMap/Statements/TDeleteMappedStatement.php index 119beb39..f4baff37 100644 --- a/framework/Data/SqlMap/Statements/TDeleteMappedStatement.php +++ b/framework/Data/SqlMap/Statements/TDeleteMappedStatement.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements */ +namespace Prado\Data\SqlMap\Statements; + /** * TDeleteMappedStatement class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements * @since 3.1 */ class TDeleteMappedStatement extends TUpdateMappedStatement diff --git a/framework/Data/SqlMap/Statements/TInsertMappedStatement.php b/framework/Data/SqlMap/Statements/TInsertMappedStatement.php index de785b94..eac88d2d 100644 --- a/framework/Data/SqlMap/Statements/TInsertMappedStatement.php +++ b/framework/Data/SqlMap/Statements/TInsertMappedStatement.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements */ +namespace Prado\Data\SqlMap\Statements; + /** * TInsertMappedStatement class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements * @since 3.1 */ class TInsertMappedStatement extends TMappedStatement diff --git a/framework/Data/SqlMap/Statements/TMappedStatement.php b/framework/Data/SqlMap/Statements/TMappedStatement.php index 517127d3..db83f755 100644 --- a/framework/Data/SqlMap/Statements/TMappedStatement.php +++ b/framework/Data/SqlMap/Statements/TMappedStatement.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements */ +namespace Prado\Data\SqlMap\Statements; + /** * TMappedStatement class executes SQL mapped statements. Mapped Statements can * hold any SQL statement and use Parameter Maps and Result Maps for input and output. @@ -16,7 +18,7 @@ * This class is usualy instantiated during SQLMap configuration by TSqlDomBuilder. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements * @since 3.0 */ class TMappedStatement extends TComponent implements IMappedStatement diff --git a/framework/Data/SqlMap/Statements/TPostSelectBinding.php b/framework/Data/SqlMap/Statements/TPostSelectBinding.php index 8180e73d..fdc7afbb 100644 --- a/framework/Data/SqlMap/Statements/TPostSelectBinding.php +++ b/framework/Data/SqlMap/Statements/TPostSelectBinding.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements */ +namespace Prado\Data\SqlMap\Statements; + /** * TPostSelectBinding class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements * @since 3.1 */ class TPostSelectBinding diff --git a/framework/Data/SqlMap/Statements/TPreparedCommand.php b/framework/Data/SqlMap/Statements/TPreparedCommand.php index 8b4bdbcc..4f59f4c7 100644 --- a/framework/Data/SqlMap/Statements/TPreparedCommand.php +++ b/framework/Data/SqlMap/Statements/TPreparedCommand.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements */ +namespace Prado\Data\SqlMap\Statements; + Prado::using('System.Data.Common.TDbMetaData'); Prado::using('System.Data.Common.TDbCommandBuilder'); @@ -16,7 +18,7 @@ Prado::using('System.Data.Common.TDbCommandBuilder'); * TPreparedCommand class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements * @since 3.1 */ class TPreparedCommand diff --git a/framework/Data/SqlMap/Statements/TPreparedStatement.php b/framework/Data/SqlMap/Statements/TPreparedStatement.php index 79f39aea..9084621a 100644 --- a/framework/Data/SqlMap/Statements/TPreparedStatement.php +++ b/framework/Data/SqlMap/Statements/TPreparedStatement.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements */ +namespace Prado\Data\SqlMap\Statements; + /** * TpreparedStatement class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements * @since 3.1 */ class TPreparedStatement extends TComponent diff --git a/framework/Data/SqlMap/Statements/TPreparedStatementFactory.php b/framework/Data/SqlMap/Statements/TPreparedStatementFactory.php index 6eef27c3..9f542ea6 100644 --- a/framework/Data/SqlMap/Statements/TPreparedStatementFactory.php +++ b/framework/Data/SqlMap/Statements/TPreparedStatementFactory.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements */ +namespace Prado\Data\SqlMap\Statements; + /** * TPreparedStatementFactory class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements * @since 3.1 */ class TPreparedStatementFactory diff --git a/framework/Data/SqlMap/Statements/TResultSetListItemParameter.php b/framework/Data/SqlMap/Statements/TResultSetListItemParameter.php index e330a5ae..ec580a5a 100644 --- a/framework/Data/SqlMap/Statements/TResultSetListItemParameter.php +++ b/framework/Data/SqlMap/Statements/TResultSetListItemParameter.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements */ +namespace Prado\Data\SqlMap\Statements; + /** * TResultSetListItemParameter class * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements * @since 3.1 */ class TResultSetListItemParameter extends TComponent diff --git a/framework/Data/SqlMap/Statements/TResultSetMapItemParameter.php b/framework/Data/SqlMap/Statements/TResultSetMapItemParameter.php index 363edb55..d44cd844 100644 --- a/framework/Data/SqlMap/Statements/TResultSetMapItemParameter.php +++ b/framework/Data/SqlMap/Statements/TResultSetMapItemParameter.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements */ +namespace Prado\Data\SqlMap\Statements; + /** * TResultSetMapItemParameter class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements * @since 3.1 */ class TResultSetMapItemParameter extends TComponent diff --git a/framework/Data/SqlMap/Statements/TSelectMappedStatement.php b/framework/Data/SqlMap/Statements/TSelectMappedStatement.php index 8e6ea75e..f97176e9 100644 --- a/framework/Data/SqlMap/Statements/TSelectMappedStatement.php +++ b/framework/Data/SqlMap/Statements/TSelectMappedStatement.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements */ +namespace Prado\Data\SqlMap\Statements; + /** * TSelectMappedStatment class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements * @since 3.1 */ class TSelectMappedStatement extends TMappedStatement diff --git a/framework/Data/SqlMap/Statements/TSimpleDynamicSql.php b/framework/Data/SqlMap/Statements/TSimpleDynamicSql.php index b2e0356d..147e5177 100644 --- a/framework/Data/SqlMap/Statements/TSimpleDynamicSql.php +++ b/framework/Data/SqlMap/Statements/TSimpleDynamicSql.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements */ +namespace Prado\Data\SqlMap\Statements; + /** * TSimpleDynamicSql class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements * @since 3.1 */ class TSimpleDynamicSql extends TStaticSql diff --git a/framework/Data/SqlMap/Statements/TSqlMapObjectCollectionTree.php b/framework/Data/SqlMap/Statements/TSqlMapObjectCollectionTree.php index 91fe3882..cc0c300b 100644 --- a/framework/Data/SqlMap/Statements/TSqlMapObjectCollectionTree.php +++ b/framework/Data/SqlMap/Statements/TSqlMapObjectCollectionTree.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements */ +namespace Prado\Data\SqlMap\Statements; + /** * TSQLMapObjectCollectionTree class. * @@ -17,7 +19,7 @@ * build using the {@link collect} method. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements * @since 3.1 */ class TSqlMapObjectCollectionTree extends TComponent diff --git a/framework/Data/SqlMap/Statements/TStaticSql.php b/framework/Data/SqlMap/Statements/TStaticSql.php index f0110332..445461b3 100644 --- a/framework/Data/SqlMap/Statements/TStaticSql.php +++ b/framework/Data/SqlMap/Statements/TStaticSql.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements */ +namespace Prado\Data\SqlMap\Statements; + /** * TStaticSql class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements * @since 3.1 */ class TStaticSql extends TComponent diff --git a/framework/Data/SqlMap/Statements/TUpdateMappedStatement.php b/framework/Data/SqlMap/Statements/TUpdateMappedStatement.php index 9ba2458d..265876f5 100644 --- a/framework/Data/SqlMap/Statements/TUpdateMappedStatement.php +++ b/framework/Data/SqlMap/Statements/TUpdateMappedStatement.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements */ +namespace Prado\Data\SqlMap\Statements; + /** * TUpdateMappedStatement class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap.Statements + * @package Prado\Data\SqlMap\Statements * @since 3.1 */ class TUpdateMappedStatement extends TMappedStatement diff --git a/framework/Data/SqlMap/TSqlMapConfig.php b/framework/Data/SqlMap/TSqlMapConfig.php index d99b99d5..80636376 100644 --- a/framework/Data/SqlMap/TSqlMapConfig.php +++ b/framework/Data/SqlMap/TSqlMapConfig.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap */ +namespace Prado\Data\SqlMap; + Prado::using('System.Data.TDataSourceConfig'); /** @@ -17,7 +19,7 @@ Prado::using('System.Data.TDataSourceConfig'); * Database connection and TSqlMapManager configuration. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap * @since 3.1 */ class TSqlMapConfig extends TDataSourceConfig @@ -176,4 +178,3 @@ class TSqlMapConfig extends TDataSourceConfig return $this->_sqlmap; } } - diff --git a/framework/Data/SqlMap/TSqlMapGateway.php b/framework/Data/SqlMap/TSqlMapGateway.php index 8ce09ee4..6f548256 100644 --- a/framework/Data/SqlMap/TSqlMapGateway.php +++ b/framework/Data/SqlMap/TSqlMapGateway.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap */ +namespace Prado\Data\SqlMap; + Prado::using('System.Data.SqlMap.TSqlMapManager'); /** @@ -22,7 +24,7 @@ Prado::using('System.Data.SqlMap.TSqlMapManager'); * This class should be instantiated from a TSqlMapManager instance. * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap * @since 3.1 */ class TSqlMapGateway extends TComponent diff --git a/framework/Data/SqlMap/TSqlMapManager.php b/framework/Data/SqlMap/TSqlMapManager.php index 0fa6fd57..0624c4a7 100644 --- a/framework/Data/SqlMap/TSqlMapManager.php +++ b/framework/Data/SqlMap/TSqlMapManager.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap */ +namespace Prado\Data\SqlMap; + Prado::using('System.Data.SqlMap.TSqlMapGateway'); Prado::using('System.Data.SqlMap.DataMapper.TSqlMapException'); Prado::using('System.Data.SqlMap.DataMapper.TSqlMapTypeHandlerRegistry'); @@ -36,7 +38,7 @@ Prado::using('System.Caching.TCache'); * </code> * * @author Wei Zhuo <weizhuo[at]gmail[dot]com> - * @package System.Data.SqlMap + * @package Prado\Data\SqlMap * @since 3.1 */ class TSqlMapManager extends TComponent diff --git a/framework/Data/TDataSourceConfig.php b/framework/Data/TDataSourceConfig.php index ecece8c4..ebe948d8 100644 --- a/framework/Data/TDataSourceConfig.php +++ b/framework/Data/TDataSourceConfig.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data + * @package Prado\Data */ +namespace Prado\Data; + Prado::using('System.Data.TDbConnection'); /** @@ -41,7 +43,7 @@ Prado::using('System.Data.TDbConnection'); * that extends the TDbConnection class. * * @author Wei Zhuo <weizho[at]gmail[dot]com> - * @package System.Data + * @package Prado\Data * @since 3.1 */ class TDataSourceConfig extends TModule diff --git a/framework/Data/TDbColumnCaseMode.php b/framework/Data/TDbColumnCaseMode.php index 553407ed..01075770 100644 --- a/framework/Data/TDbColumnCaseMode.php +++ b/framework/Data/TDbColumnCaseMode.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data + * @package Prado\Data */ +namespace Prado\Data; + /** * TDbColumnCaseMode * * @author Qiang Xue <qiang.xue@gmail.com> - * @package System.Data + * @package Prado\Data * @since 3.0 */ class TDbColumnCaseMode extends TEnumerable diff --git a/framework/Data/TDbCommand.php b/framework/Data/TDbCommand.php index 43472ea4..7d68fd6a 100644 --- a/framework/Data/TDbCommand.php +++ b/framework/Data/TDbCommand.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data + * @package Prado\Data */ +namespace Prado\Data; + /** * TDbCommand class. * @@ -31,7 +33,7 @@ * You may also call {@link prepare} to explicitly prepare an SQL statement. * * @author Qiang Xue <qiang.xue@gmail.com> - * @package System.Data + * @package Prado\Data * @since 3.0 */ class TDbCommand extends TComponent diff --git a/framework/Data/TDbConnection.php b/framework/Data/TDbConnection.php index 6ff0174e..ed9252d0 100644 --- a/framework/Data/TDbConnection.php +++ b/framework/Data/TDbConnection.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data + * @package Prado\Data */ +namespace Prado\Data; + Prado::using('System.Data.TDbTransaction'); Prado::using('System.Data.TDbCommand'); @@ -76,7 +78,7 @@ Prado::using('System.Data.TDbCommand'); * of certain DBMS attributes, such as {@link getNullConversion NullConversion}. * * @author Qiang Xue <qiang.xue@gmail.com> - * @package System.Data + * @package Prado\Data * @since 3.0 */ class TDbConnection extends TComponent diff --git a/framework/Data/TDbDataReader.php b/framework/Data/TDbDataReader.php index b28cd490..9aa5d5ca 100644 --- a/framework/Data/TDbDataReader.php +++ b/framework/Data/TDbDataReader.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data + * @package Prado\Data */ +namespace Prado\Data; + /** * TDbDataReader class. * @@ -29,7 +31,7 @@ * for more details. * * @author Qiang Xue <qiang.xue@gmail.com> - * @package System.Data + * @package Prado\Data * @since 3.0 */ class TDbDataReader extends TComponent implements Iterator diff --git a/framework/Data/TDbNullConversionMode.php b/framework/Data/TDbNullConversionMode.php index 1171861a..3d92b4fa 100644 --- a/framework/Data/TDbNullConversionMode.php +++ b/framework/Data/TDbNullConversionMode.php @@ -6,14 +6,16 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data + * @package Prado\Data */ +namespace Prado\Data; + /** * TDbNullConversionMode * * @author Qiang Xue <qiang.xue@gmail.com> - * @package System.Data + * @package Prado\Data * @since 3.0 */ class TDbNullConversionMode extends TEnumerable diff --git a/framework/Data/TDbTransaction.php b/framework/Data/TDbTransaction.php index 8a2a0821..9616d623 100644 --- a/framework/Data/TDbTransaction.php +++ b/framework/Data/TDbTransaction.php @@ -6,9 +6,11 @@ * @link http://www.pradosoft.com/ * @copyright Copyright © 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ - * @package System.Data + * @package Prado\Data */ +namespace Prado\Data; + Prado::using('System.Data.TDbDataReader'); /** @@ -34,7 +36,7 @@ Prado::using('System.Data.TDbDataReader'); * </code> * * @author Qiang Xue <qiang.xue@gmail.com> - * @package System.Data + * @package Prado\Data * @since 3.0 */ class TDbTransaction extends TComponent |