summaryrefslogtreecommitdiff
path: root/framework
diff options
context:
space:
mode:
Diffstat (limited to 'framework')
-rw-r--r--framework/Caching/TAPCCache.php6
-rw-r--r--framework/Caching/TApplicationStateCacheDependency.php5
-rw-r--r--framework/Caching/TCache.php5
-rw-r--r--framework/Caching/TCacheDependency.php5
-rw-r--r--framework/Caching/TCacheDependencyList.php6
-rw-r--r--framework/Caching/TChainedCacheDependency.php5
-rw-r--r--framework/Caching/TDbCache.php5
-rw-r--r--framework/Caching/TDirectoryCacheDependency.php6
-rw-r--r--framework/Caching/TEACache.php2
-rw-r--r--framework/Caching/TFileCacheDependency.php5
-rw-r--r--framework/Caching/TGlobalStateCacheDependency.php5
-rw-r--r--framework/Caching/TMemCache.php6
-rw-r--r--framework/Caching/TSqliteCache.php6
-rw-r--r--framework/Caching/TXCache.php6
-rw-r--r--framework/Collections/TAttributeCollection.php6
-rw-r--r--framework/Collections/TDummyDataSource.php6
-rw-r--r--framework/Collections/TDummyDataSourceIterator.php6
-rw-r--r--framework/Collections/TList.php6
-rw-r--r--framework/Collections/TListItemCollection.php6
-rw-r--r--framework/Collections/TListIterator.php5
-rw-r--r--framework/Collections/TMap.php6
-rw-r--r--framework/Collections/TMapIterator.php6
-rw-r--r--framework/Collections/TPagedDataSource.php6
-rw-r--r--framework/Collections/TPagedList.php6
-rw-r--r--framework/Collections/TPagedListFetchDataEventParameter.php6
-rw-r--r--framework/Collections/TPagedListIterator.php6
-rw-r--r--framework/Collections/TPagedListPageChangedEventParameter.php6
-rw-r--r--framework/Collections/TPagedMapIterator.php6
-rw-r--r--framework/Collections/TPriorityList.php6
-rw-r--r--framework/Collections/TPriorityMap.php6
-rw-r--r--framework/Collections/TQueue.php6
-rw-r--r--framework/Collections/TQueueIterator.php6
-rw-r--r--framework/Collections/TStack.php6
-rw-r--r--framework/Collections/TStackIterator.php6
-rw-r--r--framework/Data/ActiveRecord/Exceptions/TActiveRecordConfigurationException.php6
-rw-r--r--framework/Data/ActiveRecord/Exceptions/TActiveRecordException.php6
-rw-r--r--framework/Data/ActiveRecord/Relations/TActiveRecordBelongsTo.php6
-rw-r--r--framework/Data/ActiveRecord/Relations/TActiveRecordHasMany.php6
-rw-r--r--framework/Data/ActiveRecord/Relations/TActiveRecordHasManyAssociation.php6
-rw-r--r--framework/Data/ActiveRecord/Relations/TActiveRecordHasOne.php6
-rw-r--r--framework/Data/ActiveRecord/Relations/TActiveRecordRelation.php6
-rw-r--r--framework/Data/ActiveRecord/Relations/TActiveRecordRelationContext.php6
-rw-r--r--framework/Data/ActiveRecord/Scaffold/IScaffoldEditRenderer.php6
-rw-r--r--framework/Data/ActiveRecord/Scaffold/InputBuilder/TIbmScaffoldInput.php5
-rw-r--r--framework/Data/ActiveRecord/Scaffold/InputBuilder/TMssqlScaffoldInput.php5
-rw-r--r--framework/Data/ActiveRecord/Scaffold/InputBuilder/TMysqlScaffoldInput.php5
-rw-r--r--framework/Data/ActiveRecord/Scaffold/InputBuilder/TPgsqlScaffoldInput.php5
-rw-r--r--framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputBase.php5
-rw-r--r--framework/Data/ActiveRecord/Scaffold/InputBuilder/TScaffoldInputCommon.php5
-rw-r--r--framework/Data/ActiveRecord/Scaffold/InputBuilder/TSqliteScaffoldInput.php5
-rw-r--r--framework/Data/ActiveRecord/Scaffold/TScaffoldBase.php6
-rw-r--r--framework/Data/ActiveRecord/Scaffold/TScaffoldEditView.php6
-rw-r--r--framework/Data/ActiveRecord/Scaffold/TScaffoldListView.php6
-rw-r--r--framework/Data/ActiveRecord/Scaffold/TScaffoldSearch.php6
-rw-r--r--framework/Data/ActiveRecord/Scaffold/TScaffoldView.php6
-rw-r--r--framework/Data/ActiveRecord/TActiveRecord.php6
-rw-r--r--framework/Data/ActiveRecord/TActiveRecordChangeEventParameter.php6
-rw-r--r--framework/Data/ActiveRecord/TActiveRecordConfig.php6
-rw-r--r--framework/Data/ActiveRecord/TActiveRecordCriteria.php6
-rw-r--r--framework/Data/ActiveRecord/TActiveRecordGateway.php6
-rw-r--r--framework/Data/ActiveRecord/TActiveRecordInvalidFinderResult.php6
-rw-r--r--framework/Data/ActiveRecord/TActiveRecordManager.php6
-rw-r--r--framework/Data/Common/Mssql/TMssqlCommandBuilder.php6
-rw-r--r--framework/Data/Common/Mssql/TMssqlMetaData.php6
-rw-r--r--framework/Data/Common/Mssql/TMssqlTableColumn.php6
-rw-r--r--framework/Data/Common/Mssql/TMssqlTableInfo.php6
-rw-r--r--framework/Data/Common/Mysql/TMysqlCommandBuilder.php6
-rw-r--r--framework/Data/Common/Mysql/TMysqlMetaData.php6
-rw-r--r--framework/Data/Common/Mysql/TMysqlTableColumn.php6
-rw-r--r--framework/Data/Common/Mysql/TMysqlTableInfo.php6
-rw-r--r--framework/Data/Common/Oracle/TOracleCommandBuilder.php8
-rw-r--r--framework/Data/Common/Oracle/TOracleMetaData.php6
-rw-r--r--framework/Data/Common/Oracle/TOracleTableColumn.php6
-rw-r--r--framework/Data/Common/Oracle/TOracleTableInfo.php6
-rw-r--r--framework/Data/Common/Pgsql/TPgsqlCommandBuilder.php6
-rw-r--r--framework/Data/Common/Pgsql/TPgsqlMetaData.php6
-rw-r--r--framework/Data/Common/Pgsql/TPgsqlTableColumn.php6
-rw-r--r--framework/Data/Common/Pgsql/TPgsqlTableInfo.php6
-rw-r--r--framework/Data/Common/Sqlite/TSqliteCommandBuilder.php6
-rw-r--r--framework/Data/Common/Sqlite/TSqliteMetaData.php6
-rw-r--r--framework/Data/Common/Sqlite/TSqliteTableColumn.php6
-rw-r--r--framework/Data/Common/Sqlite/TSqliteTableInfo.php6
-rw-r--r--framework/Data/Common/TDbCommandBuilder.php6
-rw-r--r--framework/Data/Common/TDbMetaData.php6
-rw-r--r--framework/Data/Common/TDbTableColumn.php6
-rw-r--r--framework/Data/Common/TDbTableInfo.php6
-rw-r--r--framework/Data/DataGateway/TDataGatewayCommand.php277
-rw-r--r--framework/Data/DataGateway/TDataGatewayEventParameter.php319
-rw-r--r--framework/Data/DataGateway/TDataGatewayResultEventParameter.php6
-rw-r--r--framework/Data/DataGateway/TSqlCriteria.php6
-rw-r--r--framework/Data/DataGateway/TTableGateway.php6
-rw-r--r--framework/Data/SqlMap/Configuration/TDiscriminator.php6
-rw-r--r--framework/Data/SqlMap/Configuration/TInlineParameterMapParser.php6
-rw-r--r--framework/Data/SqlMap/Configuration/TParameterMap.php6
-rw-r--r--framework/Data/SqlMap/Configuration/TParameterProperty.php6
-rw-r--r--framework/Data/SqlMap/Configuration/TResultMap.php6
-rw-r--r--framework/Data/SqlMap/Configuration/TResultProperty.php6
-rw-r--r--framework/Data/SqlMap/Configuration/TSimpleDynamicParser.php6
-rw-r--r--framework/Data/SqlMap/Configuration/TSqlMapCacheKey.php6
-rw-r--r--framework/Data/SqlMap/Configuration/TSqlMapCacheModel.php6
-rw-r--r--framework/Data/SqlMap/Configuration/TSqlMapCacheTypes.php6
-rw-r--r--framework/Data/SqlMap/Configuration/TSqlMapDelete.php6
-rw-r--r--framework/Data/SqlMap/Configuration/TSqlMapInsert.php6
-rw-r--r--framework/Data/SqlMap/Configuration/TSqlMapSelect.php6
-rw-r--r--framework/Data/SqlMap/Configuration/TSqlMapSelectKey.php6
-rw-r--r--framework/Data/SqlMap/Configuration/TSqlMapStatement.php6
-rw-r--r--framework/Data/SqlMap/Configuration/TSqlMapUpdate.php6
-rw-r--r--framework/Data/SqlMap/Configuration/TSqlMapXmlConfigBuilder.php22
-rw-r--r--framework/Data/SqlMap/Configuration/TSqlMapXmlConfiguration.php16
-rw-r--r--framework/Data/SqlMap/Configuration/TSqlMapXmlMappingConfiguration.php6
-rw-r--r--framework/Data/SqlMap/Configuration/TSubMap.php6
-rw-r--r--framework/Data/SqlMap/DataMapper/TFastSqlMapApplicationCache.php6
-rw-r--r--framework/Data/SqlMap/DataMapper/TInvalidPropertyException.php6
-rw-r--r--framework/Data/SqlMap/DataMapper/TLazyLoadList.php6
-rw-r--r--framework/Data/SqlMap/DataMapper/TObjectProxy.php6
-rw-r--r--framework/Data/SqlMap/DataMapper/TPropertyAccess.php6
-rw-r--r--framework/Data/SqlMap/DataMapper/TSqlMapApplicationCache.php6
-rw-r--r--framework/Data/SqlMap/DataMapper/TSqlMapCache.php6
-rw-r--r--framework/Data/SqlMap/DataMapper/TSqlMapConfigurationException.php6
-rw-r--r--framework/Data/SqlMap/DataMapper/TSqlMapDuplicateException.php6
-rw-r--r--framework/Data/SqlMap/DataMapper/TSqlMapException.php5
-rw-r--r--framework/Data/SqlMap/DataMapper/TSqlMapExecutionException.php5
-rw-r--r--framework/Data/SqlMap/DataMapper/TSqlMapFifoCache.php7
-rw-r--r--framework/Data/SqlMap/DataMapper/TSqlMapLruCache.php7
-rw-r--r--framework/Data/SqlMap/DataMapper/TSqlMapPagedList.php6
-rw-r--r--framework/Data/SqlMap/DataMapper/TSqlMapTypeHandler.php6
-rw-r--r--framework/Data/SqlMap/DataMapper/TSqlMapTypeHandlerRegistry.php6
-rw-r--r--framework/Data/SqlMap/DataMapper/TSqlMapUndefinedException.php6
-rw-r--r--framework/Data/SqlMap/Statements/IMappedStatement.php6
-rw-r--r--framework/Data/SqlMap/Statements/TCachingStatement.php6
-rw-r--r--framework/Data/SqlMap/Statements/TDeleteMappedStatement.php6
-rw-r--r--framework/Data/SqlMap/Statements/TInsertMappedStatement.php6
-rw-r--r--framework/Data/SqlMap/Statements/TMappedStatement.php6
-rw-r--r--framework/Data/SqlMap/Statements/TPostSelectBinding.php6
-rw-r--r--framework/Data/SqlMap/Statements/TPreparedCommand.php6
-rw-r--r--framework/Data/SqlMap/Statements/TPreparedStatement.php6
-rw-r--r--framework/Data/SqlMap/Statements/TPreparedStatementFactory.php6
-rw-r--r--framework/Data/SqlMap/Statements/TResultSetListItemParameter.php6
-rw-r--r--framework/Data/SqlMap/Statements/TResultSetMapItemParameter.php6
-rw-r--r--framework/Data/SqlMap/Statements/TSelectMappedStatement.php6
-rw-r--r--framework/Data/SqlMap/Statements/TSimpleDynamicSql.php6
-rw-r--r--framework/Data/SqlMap/Statements/TSqlMapObjectCollectionTree.php6
-rw-r--r--framework/Data/SqlMap/Statements/TStaticSql.php6
-rw-r--r--framework/Data/SqlMap/Statements/TUpdateMappedStatement.php6
-rw-r--r--framework/Data/SqlMap/TSqlMapConfig.php7
-rw-r--r--framework/Data/SqlMap/TSqlMapGateway.php6
-rw-r--r--framework/Data/SqlMap/TSqlMapManager.php6
-rw-r--r--framework/Data/TDataSourceConfig.php6
-rw-r--r--framework/Data/TDbColumnCaseMode.php6
-rw-r--r--framework/Data/TDbCommand.php6
-rw-r--r--framework/Data/TDbConnection.php6
-rw-r--r--framework/Data/TDbDataReader.php6
-rw-r--r--framework/Data/TDbNullConversionMode.php6
-rw-r--r--framework/Data/TDbTransaction.php6
154 files changed, 883 insertions, 635 deletions
diff --git a/framework/Caching/TAPCCache.php b/framework/Caching/TAPCCache.php
index ec0aa35c..53f1069e 100644
--- a/framework/Caching/TAPCCache.php
+++ b/framework/Caching/TAPCCache.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright © 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Caching
+ * @package Prado\Caching
*/
+namespace Prado\Caching;
+
/**
* TAPCCache class
*
@@ -40,7 +42,7 @@
*
* @author Alban Hanry <compte_messagerie@hotmail.com>
* @author Knut Urdalen <knut.urdalen@gmail.com>
- * @package System.Caching
+ * @package Prado\Caching
* @since 3.0b
*/
class TAPCCache extends TCache
diff --git a/framework/Caching/TApplicationStateCacheDependency.php b/framework/Caching/TApplicationStateCacheDependency.php
index a5a3f764..ee36ba54 100644
--- a/framework/Caching/TApplicationStateCacheDependency.php
+++ b/framework/Caching/TApplicationStateCacheDependency.php
@@ -6,9 +6,10 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Caching
+ * @package Prado\Caching
*/
+namespace Prado\Caching;
/**
* TApplicationStateCacheDependency class.
@@ -23,7 +24,7 @@
* will be checked.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Caching
+ * @package Prado\Caching
* @since 3.1.0
*/
class TApplicationStateCacheDependency extends TCacheDependency
diff --git a/framework/Caching/TCache.php b/framework/Caching/TCache.php
index 10e28f6c..88a391c9 100644
--- a/framework/Caching/TCache.php
+++ b/framework/Caching/TCache.php
@@ -6,9 +6,10 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Caching
+ * @package Prado\Caching
*/
+namespace Prado\Caching;
Prado::using('System.Collections.TList');
/**
@@ -41,7 +42,7 @@ Prado::using('System.Collections.TList');
* the cache acts as an array.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Caching
+ * @package Prado\Caching
* @since 3.0
*/
abstract class TCache extends TModule implements ICache, ArrayAccess
diff --git a/framework/Caching/TCacheDependency.php b/framework/Caching/TCacheDependency.php
index 269bedf2..7b2b1261 100644
--- a/framework/Caching/TCacheDependency.php
+++ b/framework/Caching/TCacheDependency.php
@@ -6,9 +6,10 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Caching
+ * @package Prado\Caching
*/
+namespace Prado\Caching;
/**
* TCacheDependency class.
@@ -35,7 +36,7 @@
* - {@link TChainedCacheDependency}: checks whether any of a list of dependencies is changed or not
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Caching
+ * @package Prado\Caching
* @since 3.1.0
*/
abstract class TCacheDependency extends TComponent implements ICacheDependency
diff --git a/framework/Caching/TCacheDependencyList.php b/framework/Caching/TCacheDependencyList.php
index d74ce060..6e43d428 100644
--- a/framework/Caching/TCacheDependencyList.php
+++ b/framework/Caching/TCacheDependencyList.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Caching
+ * @package Prado\Caching
*/
+namespace Prado\Caching;
+
/**
* TCacheDependencyList class.
*
@@ -19,7 +21,7 @@
* for more details.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Caching
+ * @package Prado\Caching
* @since 3.1.0
*/
class TCacheDependencyList extends TList
diff --git a/framework/Caching/TChainedCacheDependency.php b/framework/Caching/TChainedCacheDependency.php
index 463919fd..4f45cac9 100644
--- a/framework/Caching/TChainedCacheDependency.php
+++ b/framework/Caching/TChainedCacheDependency.php
@@ -6,9 +6,10 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Caching
+ * @package Prado\Caching
*/
+namespace Prado\Caching;
/**
* TChainedCacheDependency class.
@@ -23,7 +24,7 @@
* (see {@link TList} for more details}).
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Caching
+ * @package Prado\Caching
* @since 3.1.0
*/
class TChainedCacheDependency extends TCacheDependency
diff --git a/framework/Caching/TDbCache.php b/framework/Caching/TDbCache.php
index c26066a2..968fac30 100644
--- a/framework/Caching/TDbCache.php
+++ b/framework/Caching/TDbCache.php
@@ -6,9 +6,10 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Caching
+ * @package Prado\Caching
*/
+namespace Prado\Caching;
Prado::using('System.Data.TDbConnection');
/**
@@ -81,7 +82,7 @@ Prado::using('System.Data.TDbConnection');
* </code>
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Caching
+ * @package Prado\Caching
* @since 3.1.0
*/
class TDbCache extends TCache
diff --git a/framework/Caching/TDirectoryCacheDependency.php b/framework/Caching/TDirectoryCacheDependency.php
index 66f7393d..d78aa87a 100644
--- a/framework/Caching/TDirectoryCacheDependency.php
+++ b/framework/Caching/TDirectoryCacheDependency.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Caching
+ * @package Prado\Caching
*/
+namespace Prado\Caching;
+
/**
* TDirectoryCacheDependency class.
*
@@ -24,7 +26,7 @@
* to a certain depth of the subdirectories.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Caching
+ * @package Prado\Caching
* @since 3.1.0
*/
class TDirectoryCacheDependency extends TCacheDependency
diff --git a/framework/Caching/TEACache.php b/framework/Caching/TEACache.php
index f57011a6..073b7f79 100644
--- a/framework/Caching/TEACache.php
+++ b/framework/Caching/TEACache.php
@@ -1 +1 @@
-<?php /** * TEACache class file * * @author Dario rigolin <drigolin@e-portaltech.it> * @link http://www.pradosoft.com/ * @copyright Copyright &copy; 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ * @package System.Caching */ /** * TEACache class * * TEACache implements a cache application module based on {@link http://eaccelerator.net/ eAccelerator}. * * By definition, cache does not ensure the existence of a value * even if it never expires. Cache is not meant to be an persistent storage. * * To use this module, the eAccelerator PHP extension must be loaded and enabled * * Please note that as of v0.9.6, eAccelerator no longer supports data caching. * This means if you still want to use this component, your eAccelerator should be of 0.9.5.x or lower version. * * Some usage examples of TEACache are as follows, * <code> * $cache=new TEACache; // TEACache may also be loaded as a Prado application module * $cache->init(null); * $cache->add('object',$object); * $object2=$cache->get('object'); * </code> * * If loaded, TEACache will register itself with {@link TApplication} as the * cache module. It can be accessed via {@link TApplication::getCache()}. * * TEACache may be configured in application configuration file as follows * <code> * <module id="cache" class="System.Caching.TEACache" /> * </code> * * @author Dario Rigolin <drigolin@e-portaltech.it> * @package System.Caching * @since 3.2.2 */ class TEACache extends TCache { /** * Initializes this module. * This method is required by the IModule interface. * @param TXmlElement configuration for this module, can be null * @throws TConfigurationException if eaccelerator extension is not installed or not started, check your php.ini */ public function init($config) { if(!function_exists('eaccelerator_get')) throw new TConfigurationException('eacceleratorcache_extension_required'); parent::init($config); } /** * Retrieves a value from cache with a specified key. * This is the implementation of the method declared in the parent class. * @param string a unique key identifying the cached value * @return string the value stored in cache, false if the value is not in the cache or expired. */ protected function getValue($key) { $value = eaccelerator_get($key); return ($value === null) ? false : $value; } /** * Stores a value identified by a key in cache. * This is the implementation of the method declared in the parent class. * * @param string the key identifying the value to be cached * @param string the value to be cached * @param integer the number of seconds in which the cached value will expire. 0 means never expire. * @return boolean true if the value is successfully stored into cache, false otherwise */ protected function setValue($key,$value,$expire) { return eaccelerator_put($key,$value,$expire); } /** * Stores a value identified by a key into cache if the cache does not contain this key. * This is the implementation of the method declared in the parent class. * * @param string the key identifying the value to be cached * @param string the value to be cached * @param integer the number of seconds in which the cached value will expire. 0 means never expire. * @return boolean true if the value is successfully stored into cache, false otherwise */ protected function addValue($key,$value,$expire) { return (null === eaccelerator_get($key)) ? $this->setValue($key,$value,$expire) : false; } /** * Deletes a value with the specified key from cache * This is the implementation of the method declared in the parent class. * @param string the key of the value to be deleted * @return boolean if no error happens during deletion */ protected function deleteValue($key) { return eaccelerator_rm($key); } /** * Deletes all values from cache. * Be careful of performing this operation if the cache is shared by multiple applications. */ public function flush() { // first, remove expired content from cache eaccelerator_gc(); // now, remove leftover cache-keys $keys = eaccelerator_list_keys(); foreach($keys as $key) $this->deleteValue(substr($key['name'], 1)); return true; } } \ No newline at end of file
+<?php /** * TEACache class file * * @author Dario rigolin <drigolin@e-portaltech.it> * @link http://www.pradosoft.com/ * @copyright Copyright &copy; 2005-2014 PradoSoft * @license http://www.pradosoft.com/license/ * @package Prado\Caching */ namespace Prado\Caching; /** * TEACache class * * TEACache implements a cache application module based on {@link http://eaccelerator.net/ eAccelerator}. * * By definition, cache does not ensure the existence of a value * even if it never expires. Cache is not meant to be an persistent storage. * * To use this module, the eAccelerator PHP extension must be loaded and enabled * * Please note that as of v0.9.6, eAccelerator no longer supports data caching. * This means if you still want to use this component, your eAccelerator should be of 0.9.5.x or lower version. * * Some usage examples of TEACache are as follows, * <code> * $cache=new TEACache; // TEACache may also be loaded as a Prado application module * $cache->init(null); * $cache->add('object',$object); * $object2=$cache->get('object'); * </code> * * If loaded, TEACache will register itself with {@link TApplication} as the * cache module. It can be accessed via {@link TApplication::getCache()}. * * TEACache may be configured in application configuration file as follows * <code> * <module id="cache" class="System.Caching.TEACache" /> * </code> * * @author Dario Rigolin <drigolin@e-portaltech.it> * @package Prado\Caching * @since 3.2.2 */ class TEACache extends TCache { /** * Initializes this module. * This method is required by the IModule interface. * @param TXmlElement configuration for this module, can be null * @throws TConfigurationException if eaccelerator extension is not installed or not started, check your php.ini */ public function init($config) { if(!function_exists('eaccelerator_get')) throw new TConfigurationException('eacceleratorcache_extension_required'); parent::init($config); } /** * Retrieves a value from cache with a specified key. * This is the implementation of the method declared in the parent class. * @param string a unique key identifying the cached value * @return string the value stored in cache, false if the value is not in the cache or expired. */ protected function getValue($key) { $value = eaccelerator_get($key); return ($value === null) ? false : $value; } /** * Stores a value identified by a key in cache. * This is the implementation of the method declared in the parent class. * * @param string the key identifying the value to be cached * @param string the value to be cached * @param integer the number of seconds in which the cached value will expire. 0 means never expire. * @return boolean true if the value is successfully stored into cache, false otherwise */ protected function setValue($key,$value,$expire) { return eaccelerator_put($key,$value,$expire); } /** * Stores a value identified by a key into cache if the cache does not contain this key. * This is the implementation of the method declared in the parent class. * * @param string the key identifying the value to be cached * @param string the value to be cached * @param integer the number of seconds in which the cached value will expire. 0 means never expire. * @return boolean true if the value is successfully stored into cache, false otherwise */ protected function addValue($key,$value,$expire) { return (null === eaccelerator_get($key)) ? $this->setValue($key,$value,$expire) : false; } /** * Deletes a value with the specified key from cache * This is the implementation of the method declared in the parent class. * @param string the key of the value to be deleted * @return boolean if no error happens during deletion */ protected function deleteValue($key) { return eaccelerator_rm($key); } /** * Deletes all values from cache. * Be careful of performing this operation if the cache is shared by multiple applications. */ public function flush() { // first, remove expired content from cache eaccelerator_gc(); // now, remove leftover cache-keys $keys = eaccelerator_list_keys(); foreach($keys as $key) $this->deleteValue(substr($key['name'], 1)); return true; } } \ No newline at end of file
diff --git a/framework/Caching/TFileCacheDependency.php b/framework/Caching/TFileCacheDependency.php
index 4a4694bd..e8f1c2fd 100644
--- a/framework/Caching/TFileCacheDependency.php
+++ b/framework/Caching/TFileCacheDependency.php
@@ -6,9 +6,10 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Caching
+ * @package Prado\Caching
*/
+namespace Prado\Caching;
/**
* TFileCacheDependency class.
@@ -19,7 +20,7 @@
* last modification time remains unchanged.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Caching
+ * @package Prado\Caching
* @since 3.1.0
*/
class TFileCacheDependency extends TCacheDependency
diff --git a/framework/Caching/TGlobalStateCacheDependency.php b/framework/Caching/TGlobalStateCacheDependency.php
index daae990e..b10b5e01 100644
--- a/framework/Caching/TGlobalStateCacheDependency.php
+++ b/framework/Caching/TGlobalStateCacheDependency.php
@@ -6,9 +6,10 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Caching
+ * @package Prado\Caching
*/
+namespace Prado\Caching;
/**
* TGlobalStateCacheDependency class.
@@ -19,7 +20,7 @@
* set {@link setStateName StateName} to the name of the global state.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Caching
+ * @package Prado\Caching
* @since 3.1.0
*/
class TGlobalStateCacheDependency extends TCacheDependency
diff --git a/framework/Caching/TMemCache.php b/framework/Caching/TMemCache.php
index c2d4901b..8c92bab1 100644
--- a/framework/Caching/TMemCache.php
+++ b/framework/Caching/TMemCache.php
@@ -7,9 +7,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Caching
+ * @package Prado\Caching
*/
+namespace Prado\Caching;
+
/**
* TMemCache class
*
@@ -76,7 +78,7 @@
* NB : MemCache server(s) must be restarted to apply settings. Require (PECL memcache >= 2.0.0).
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Caching
+ * @package Prado\Caching
* @since 3.0
*/
class TMemCache extends TCache
diff --git a/framework/Caching/TSqliteCache.php b/framework/Caching/TSqliteCache.php
index 3c11d45f..12d3e225 100644
--- a/framework/Caching/TSqliteCache.php
+++ b/framework/Caching/TSqliteCache.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Caching
+ * @package Prado\Caching
*/
+namespace Prado\Caching;
+
/**
* TSqliteCache class
*
@@ -66,7 +68,7 @@
* SQLite DB file (in the namespace format).
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Caching
+ * @package Prado\Caching
* @since 3.0
*/
class TSqliteCache extends TCache
diff --git a/framework/Caching/TXCache.php b/framework/Caching/TXCache.php
index b29fd38c..96af68f5 100644
--- a/framework/Caching/TXCache.php
+++ b/framework/Caching/TXCache.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Caching
+ * @package Prado\Caching
*/
+namespace Prado\Caching;
+
/**
* TXCache class
*
@@ -36,7 +38,7 @@
* </code>
*
* @author Wei Zhuo <weizhuo[at]gmail[dot]com>
- * @package System.Caching
+ * @package Prado\Caching
* @since 3.1.1
*/
class TXCache extends TCache
diff --git a/framework/Collections/TAttributeCollection.php b/framework/Collections/TAttributeCollection.php
index 775ad054..818d98d8 100644
--- a/framework/Collections/TAttributeCollection.php
+++ b/framework/Collections/TAttributeCollection.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
+
/**
* Includes TMap class
*/
@@ -37,7 +39,7 @@ Prado::using('System.Collections.TMap');
* in the collection storage.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.0
*/
class TAttributeCollection extends TMap
diff --git a/framework/Collections/TDummyDataSource.php b/framework/Collections/TDummyDataSource.php
index a0578ead..479a0e8f 100644
--- a/framework/Collections/TDummyDataSource.php
+++ b/framework/Collections/TDummyDataSource.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
+
/**
* TDummyDataSource class
*
@@ -21,7 +23,7 @@
* </code>
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.0
*/
class TDummyDataSource extends TComponent implements IteratorAggregate, Countable
diff --git a/framework/Collections/TDummyDataSourceIterator.php b/framework/Collections/TDummyDataSourceIterator.php
index d9829a55..4934fa7f 100644
--- a/framework/Collections/TDummyDataSourceIterator.php
+++ b/framework/Collections/TDummyDataSourceIterator.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
+
/**
* TDummyDataSourceIterator class
*
@@ -19,7 +21,7 @@
* for traversing its dummy items.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.0
*/
class TDummyDataSourceIterator implements Iterator
diff --git a/framework/Collections/TList.php b/framework/Collections/TList.php
index f4b83036..04cbd772 100644
--- a/framework/Collections/TList.php
+++ b/framework/Collections/TList.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
+
/**
* TList class
*
@@ -31,7 +33,7 @@
* operation, override {@link insertAt()}, and {@link removeAt()}.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.0
*/
class TList extends TComponent implements IteratorAggregate,ArrayAccess,Countable
diff --git a/framework/Collections/TListItemCollection.php b/framework/Collections/TListItemCollection.php
index 90a1fbf1..bb71c85d 100644
--- a/framework/Collections/TListItemCollection.php
+++ b/framework/Collections/TListItemCollection.php
@@ -8,9 +8,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
+
/**
* Includes the supporting classes
*/
@@ -23,7 +25,7 @@ Prado::using('System.Web.UI.WebControls.TListItem');
* TListItemCollection maintains a list of {@link TListItem} for {@link TListControl}.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.0
*/
class TListItemCollection extends TList
diff --git a/framework/Collections/TListIterator.php b/framework/Collections/TListIterator.php
index 3234d1ac..b810d5dd 100644
--- a/framework/Collections/TListIterator.php
+++ b/framework/Collections/TListIterator.php
@@ -6,9 +6,10 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
/**
* TListIterator class
@@ -20,7 +21,7 @@
*
* @deprecated Issue 264 : ArrayIterator should be used instead
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.0
*/
class TListIterator implements Iterator
diff --git a/framework/Collections/TMap.php b/framework/Collections/TMap.php
index fe30b932..d06028e0 100644
--- a/framework/Collections/TMap.php
+++ b/framework/Collections/TMap.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
+
/**
* TMap class
*
@@ -27,7 +29,7 @@
* </code>
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.0
*/
class TMap extends TComponent implements IteratorAggregate,ArrayAccess,Countable
diff --git a/framework/Collections/TMapIterator.php b/framework/Collections/TMapIterator.php
index 238441a3..a2b813d7 100644
--- a/framework/Collections/TMapIterator.php
+++ b/framework/Collections/TMapIterator.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
+
/**
* TMapIterator class
*
@@ -19,7 +21,7 @@
*
* @deprecated Issue 264 : ArrayIterator should be used instead
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.0
*/
class TMapIterator implements Iterator
diff --git a/framework/Collections/TPagedDataSource.php b/framework/Collections/TPagedDataSource.php
index b888348e..db929048 100644
--- a/framework/Collections/TPagedDataSource.php
+++ b/framework/Collections/TPagedDataSource.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
+
/**
* TPagedDataSource class
*
@@ -23,7 +25,7 @@
* within the specified page will be returned and traversed.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.0
*/
class TPagedDataSource extends TComponent implements IteratorAggregate,Countable
diff --git a/framework/Collections/TPagedList.php b/framework/Collections/TPagedList.php
index 2b349413..f62942c8 100644
--- a/framework/Collections/TPagedList.php
+++ b/framework/Collections/TPagedList.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
+
/**
* TPagedList class
*
@@ -50,7 +52,7 @@
*
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.0
*/
class TPagedList extends TList
diff --git a/framework/Collections/TPagedListFetchDataEventParameter.php b/framework/Collections/TPagedListFetchDataEventParameter.php
index ea91f775..a805ab87 100644
--- a/framework/Collections/TPagedListFetchDataEventParameter.php
+++ b/framework/Collections/TPagedListFetchDataEventParameter.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
+
/**
* TPagedListFetchDataEventParameter class.
*
@@ -21,7 +23,7 @@
* Newly fetched data should be saved in {@link setData Data} property.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.0
*/
class TPagedListFetchDataEventParameter extends TEventParameter
diff --git a/framework/Collections/TPagedListIterator.php b/framework/Collections/TPagedListIterator.php
index 8a2166cb..e63f9a22 100644
--- a/framework/Collections/TPagedListIterator.php
+++ b/framework/Collections/TPagedListIterator.php
@@ -6,10 +6,10 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Collections
+ * @package Prado\Collections
*/
-
+namespace Prado\Collections;
/**
* TPagedListIterator class
@@ -20,7 +20,7 @@
* to return a new iterator for traversing the items in a {@link TList} object.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.0
*/
class TPagedListIterator implements Iterator
diff --git a/framework/Collections/TPagedListPageChangedEventParameter.php b/framework/Collections/TPagedListPageChangedEventParameter.php
index 9b9f500e..476f2b05 100644
--- a/framework/Collections/TPagedListPageChangedEventParameter.php
+++ b/framework/Collections/TPagedListPageChangedEventParameter.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
+
/**
* TPagedListPageChangedEventParameter class.
* TPagedListPageChangedEventParameter is used as the parameter for
@@ -16,7 +18,7 @@
* To obtain the page index before it was changed, use {@link getOldPageIndex OldPageIndex}.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.0
*/
class TPagedListPageChangedEventParameter extends TEventParameter
diff --git a/framework/Collections/TPagedMapIterator.php b/framework/Collections/TPagedMapIterator.php
index c5a078c1..be223f50 100644
--- a/framework/Collections/TPagedMapIterator.php
+++ b/framework/Collections/TPagedMapIterator.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
+
/**
* TPagedMapIterator class
*
@@ -18,7 +20,7 @@
* to return a new iterator for traversing the items in a {@link TMap} object.
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.0
*/
class TPagedMapIterator implements Iterator
diff --git a/framework/Collections/TPriorityList.php b/framework/Collections/TPriorityList.php
index 6a66b5be..53486f45 100644
--- a/framework/Collections/TPriorityList.php
+++ b/framework/Collections/TPriorityList.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
+
/**
* TPriorityList class
*
@@ -42,7 +44,7 @@
* override {@link insertAtIndexInPriority()} and {@link removeAtIndexInPriority()} and then call the parent.
*
* @author Brad Anderson <javalizard@gmail.com>
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.2a
*/
class TPriorityList extends TList
diff --git a/framework/Collections/TPriorityMap.php b/framework/Collections/TPriorityMap.php
index 352e56ff..7cdde7f0 100644
--- a/framework/Collections/TPriorityMap.php
+++ b/framework/Collections/TPriorityMap.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
+
/**
* TPriorityMap class
*
@@ -50,7 +52,7 @@
* the decimal space. See {@link round}.
*
* @author Brad Anderson <javalizard@mac.com>
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.2a
*/
Prado::using('System.Collections.TMap');
diff --git a/framework/Collections/TQueue.php b/framework/Collections/TQueue.php
index 824a7e5f..bde43bfa 100644
--- a/framework/Collections/TQueue.php
+++ b/framework/Collections/TQueue.php
@@ -7,9 +7,11 @@
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
+
/**
* TQueue class
*
@@ -29,7 +31,7 @@
* @author Qiang Xue <qiang.xue@gmail.com>
* @author Knut Urdalen <knut.urdalen@gmail.com>
* @version $Id$
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.1
*/
class TQueue extends TComponent implements IteratorAggregate,Countable
diff --git a/framework/Collections/TQueueIterator.php b/framework/Collections/TQueueIterator.php
index 29a973d1..395c1050 100644
--- a/framework/Collections/TQueueIterator.php
+++ b/framework/Collections/TQueueIterator.php
@@ -7,9 +7,11 @@
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
* @version $Id$
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
+
/**
* TQueueIterator class
*
@@ -20,7 +22,7 @@
*
* @author Qiang Xue <qiang.xue@gmail.com>
* @version $Id$
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.1
*/
class TQueueIterator implements Iterator
diff --git a/framework/Collections/TStack.php b/framework/Collections/TStack.php
index cb98e604..3c903e7e 100644
--- a/framework/Collections/TStack.php
+++ b/framework/Collections/TStack.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
+
/**
* TStack class
*
@@ -26,7 +28,7 @@
* </code>
*
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.0
*/
class TStack extends TComponent implements IteratorAggregate,Countable
diff --git a/framework/Collections/TStackIterator.php b/framework/Collections/TStackIterator.php
index 48b7c75f..1ebc2ccd 100644
--- a/framework/Collections/TStackIterator.php
+++ b/framework/Collections/TStackIterator.php
@@ -6,9 +6,11 @@
* @link http://www.pradosoft.com/
* @copyright Copyright &copy; 2005-2014 PradoSoft
* @license http://www.pradosoft.com/license/
- * @package System.Collections
+ * @package Prado\Collections
*/
+namespace Prado\Collections;
+
/**
* TStackIterator class
*
@@ -19,7 +21,7 @@
*
* @deprecated Issue 264 : ArrayIterator should be used instead
* @author Qiang Xue <qiang.xue@gmail.com>
- * @package System.Collections
+ * @package Prado\Collections
* @since 3.0
*/
class TStackIterator implements Iterator
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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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 &copy; 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