Changeset 4910 for trunk/lib/Doctrine
- Timestamp:
- 09/12/08 09:51:56 (4 months ago)
- Location:
- trunk/lib/Doctrine
- Files:
-
- 47 added
- 2 removed
- 53 modified
-
Adapter/Db2.php (modified) (2 diffs)
-
Adapter/Exception.php (modified) (2 diffs)
-
Adapter/Interface.php (modified) (1 diff)
-
Adapter/Mock.php (modified) (1 diff)
-
Adapter/Mysqli.php (modified) (1 diff)
-
Adapter/Resource.php (modified) (1 diff)
-
Adapter/Statement/Interface.php (modified) (1 diff)
-
Association/ManyToMany.php (modified) (1 diff)
-
Association/OneToMany.php (modified) (1 diff)
-
Cache/Apc.php (modified) (2 diffs)
-
Cache/Array.php (modified) (2 diffs)
-
Cache/Driver.php (modified) (1 diff)
-
Cache/Memcache.php (modified) (1 diff)
-
Cache/Xcache.php (modified) (1 diff)
-
ClassMetadata/CodeDriver.php (modified) (2 diffs)
-
ClassMetadata/Exception.php (modified) (1 diff)
-
Collection.php (modified) (1 diff)
-
Collection/Exception.php (modified) (1 diff)
-
Collection/Iterator.php (modified) (1 diff)
-
Collection/Iterator/Expandable.php (modified) (2 diffs)
-
Collection/Iterator/Normal.php (modified) (2 diffs)
-
Collection/Iterator/Offset.php (modified) (2 diffs)
-
Collection/Offset.php (modified) (1 diff)
-
Compiler/Exception.php (modified) (1 diff)
-
Connection.php (modified) (29 diffs)
-
Connection/Common.php (modified) (1 diff)
-
Connection/Db2.php (modified) (1 diff)
-
Connection/Exception.php (modified) (2 diffs)
-
Connection/Firebird.php (modified) (1 diff)
-
Connection/Informix.php (modified) (1 diff)
-
Connection/Module.php (modified) (1 diff)
-
Connection/Mssql.php (modified) (1 diff)
-
Connection/Mysql.php (modified) (1 diff)
-
Connection/Oracle.php (modified) (1 diff)
-
Connection/Pgsql.php (modified) (1 diff)
-
Connection/Profiler.php (modified) (2 diffs)
-
Connection/Profiler/Exception.php (modified) (2 diffs)
-
Connection/Sqlite.php (modified) (1 diff)
-
Connection/Statement.php (modified) (1 diff)
-
Connection/UnitOfWork.php (modified) (2 diffs)
-
DatabasePlatform (deleted)
-
DatabasePlatform.php (modified) (1 diff)
-
DataType (deleted)
-
DBAL (added)
-
DBAL/Connection.php (added)
-
DBAL/Driver (added)
-
DBAL/Driver.php (added)
-
DBAL/Driver/PDOMsSql (added)
-
DBAL/Driver/PDOMsSql/Connection.php (added)
-
DBAL/Driver/PDOMsSql/Driver.php (added)
-
DBAL/Driver/PDOMySql (added)
-
DBAL/Driver/PDOMySql/Connection.php (added)
-
DBAL/Driver/PDOMySql/Driver.php (added)
-
DBAL/Driver/PDOOracle (added)
-
DBAL/Driver/PDOOracle/Driver.php (added)
-
DBAL/Driver/PDOPgSql (added)
-
DBAL/Driver/PDOPgSql/Driver.php (added)
-
DBAL/Driver/PDOSqlite (added)
-
DBAL/Driver/PDOSqlite/Driver.php (added)
-
DBAL/Exceptions (added)
-
DBAL/Platforms (added)
-
DBAL/Platforms/AbstractPlatform.php (added)
-
DBAL/Platforms/Db2Platform.php (added)
-
DBAL/Platforms/FirebirdPlatform.php (added)
-
DBAL/Platforms/InformixPlatform.php (added)
-
DBAL/Platforms/MockPlatform.php (added)
-
DBAL/Platforms/MsSqlPlatform.php (added)
-
DBAL/Platforms/MySqlPlatform.php (added)
-
DBAL/Platforms/OraclePlatform.php (added)
-
DBAL/Platforms/PostgreSqlPlatform.php (added)
-
DBAL/Platforms/SqlitePlatform.php (added)
-
DBAL/Schema (added)
-
DBAL/Statement.php (added)
-
DBAL/Types (added)
-
DBAL/Types/ArrayType.php (added)
-
DBAL/Types/BooleanType.php (added)
-
DBAL/Types/DateTimeType.php (added)
-
DBAL/Types/DecimalType.php (added)
-
DBAL/Types/IntegerType.php (added)
-
DBAL/Types/StringType.php (added)
-
DBAL/Types/TextType.php (added)
-
Hydrator/ArrayDriver.php (modified) (1 diff)
-
ORM (added)
-
ORM/Cache (added)
-
ORM/Exceptions (added)
-
ORM/Export (added)
-
ORM/Id (added)
-
ORM/Import (added)
-
ORM/Internal (added)
-
ORM/Mapping (added)
-
ORM/Persisters (added)
-
Schema/MySqlSchemaManger.php (modified) (1 diff)
-
Transaction.php (modified) (4 diffs)
-
Transaction/Exception.php (modified) (1 diff)
-
Transaction/Firebird.php (modified) (1 diff)
-
Transaction/Informix.php (modified) (1 diff)
-
Transaction/Mock.php (modified) (1 diff)
-
Transaction/Mssql.php (modified) (1 diff)
-
Transaction/Mysql.php (modified) (1 diff)
-
Transaction/Oracle.php (modified) (1 diff)
-
Transaction/Pgsql.php (modified) (1 diff)
-
Transaction/Sqlite.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/lib/Doctrine/Adapter/Db2.php
r3882 r4910 19 19 * <http://www.phpdoctrine.org>. 20 20 */ 21 Doctrine::autoload('Doctrine_Adapter'); 21 22 22 /** 23 23 * Doctrine_Adapter_Db2 … … 31 31 * @since 1.0 32 32 * @version $Revision: 1080 $ 33 * @deprecated 33 34 */ 34 35 class Doctrine_Adapter_Db2 extends Doctrine_Adapter -
trunk/lib/Doctrine/Adapter/Exception.php
r3882 r4910 19 19 * <http://www.phpdoctrine.org>. 20 20 */ 21 Doctrine::autoload('Doctrine_Exception'); 21 22 22 /** 23 23 * Doctrine_Adapter_Exception … … 30 30 * @version $Revision$ 31 31 * @author Konsta Vesterinen <kvesteri@cc.hut.fi> 32 * @deprecated 32 33 */ 33 34 class Doctrine_Adapter_Exception extends Doctrine_Exception -
trunk/lib/Doctrine/Adapter/Interface.php
r3882 r4910 31 31 * @since 1.0 32 32 * @version $Revision$ 33 * @deprecated 33 34 */ 34 35 interface Doctrine_Adapter_Interface { -
trunk/lib/Doctrine/Adapter/Mock.php
r3882 r4910 31 31 * @since 1.0 32 32 * @version $Revision$ 33 * @deprecated 33 34 */ 34 35 class Doctrine_Adapter_Mock implements Doctrine_Adapter_Interface, Countable -
trunk/lib/Doctrine/Adapter/Mysqli.php
r3882 r4910 31 31 * @since 1.0 32 32 * @version $Revision: 1080 $ 33 * @deprecated 33 34 */ 34 35 class Doctrine_Adapter_Mysqli extends Doctrine_Adapter -
trunk/lib/Doctrine/Adapter/Resource.php
r3882 r4910 30 30 * @since 1.0 31 31 * @version $Revision: 2702 $ 32 * @deprecated 33 * @todo Remove 32 34 */ 33 35 class Doctrine_Adapter_Resource implements Doctrine_Adapter_Interface -
trunk/lib/Doctrine/Adapter/Statement/Interface.php
r3882 r4910 30 30 * @since 1.0 31 31 * @version $Revision$ 32 * @deprecated 32 33 */ 33 34 interface Doctrine_Adapter_Statement_Interface -
trunk/lib/Doctrine/Association/ManyToMany.php
r4800 r4910 1 1 <?php 2 2 3 #namespace Doctrine::ORM::Mapping s;3 #namespace Doctrine::ORM::Mapping; 4 4 5 5 /** -
trunk/lib/Doctrine/Association/OneToMany.php
r4800 r4910 20 20 */ 21 21 22 #namespace Doctrine::ORM::Mapping s;22 #namespace Doctrine::ORM::Mapping; 23 23 24 24 /** -
trunk/lib/Doctrine/Cache/Apc.php
r4789 r4910 20 20 */ 21 21 22 #namespace Doctrine:: Common::Cache;22 #namespace Doctrine::ORM::Cache; 23 23 24 24 /** 25 * Doctrine_Cache_Apc25 * APC cache driver. 26 26 * 27 * @package Doctrine28 * @subpackage Cache29 27 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 30 28 * @link www.phpdoctrine.org … … 32 30 * @version $Revision$ 33 31 * @author Konsta Vesterinen <kvesteri@cc.hut.fi> 34 * @todo Rename to ApcCache35 32 */ 36 33 class Doctrine_Cache_Apc extends Doctrine_Cache_Driver -
trunk/lib/Doctrine/Cache/Array.php
r3931 r4910 21 21 22 22 /** 23 * Doctrine_Cache_Interface23 * Array cache driver. 24 24 * 25 * @package Doctrine26 * @subpackage Cache27 25 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 28 26 * @link www.phpdoctrine.org … … 31 29 * @author Konsta Vesterinen <kvesteri@cc.hut.fi> 32 30 */ 33 class Doctrine_Cache_Array implements Countable,Doctrine_Cache_Interface31 class Doctrine_Cache_Array implements Doctrine_Cache_Interface 34 32 { 35 33 /** -
trunk/lib/Doctrine/Cache/Driver.php
r3882 r4910 21 21 22 22 /** 23 * Doctrine_Cache_Driver23 * Base class for cache drivers. 24 24 * 25 * @package Doctrine26 * @subpackage Cache27 25 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 28 26 * @link www.phpdoctrine.org -
trunk/lib/Doctrine/Cache/Memcache.php
r4789 r4910 21 21 22 22 /** 23 * Doctrine_Cache_Memcache23 * Memcache cache driver. 24 24 * 25 * @package Doctrine26 * @subpackage Cache27 25 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 28 26 * @link www.phpdoctrine.org -
trunk/lib/Doctrine/Cache/Xcache.php
r4789 r4910 21 21 22 22 /** 23 * Doctrine_Cache_Xcache23 * Xcache cache driver. 24 24 * 25 * @package Doctrine26 * @subpackage Cache27 25 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 28 26 * @link www.phpdoctrine.org -
trunk/lib/Doctrine/ClassMetadata/CodeDriver.php
r4653 r4910 20 20 */ 21 21 22 #namespace Doctrine::ORM::Internal; 23 22 24 /** 23 25 * The code metadata driver loads the metadata of the classes through invoking … … 26 28 * @author Konsta Vesterinen <kvesteri@cc.hut.fi> 27 29 * @author Roman Borschel <roman@code-factory.org> 28 * @package Doctrine29 * @subpackage ClassMetadata30 30 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL 31 31 * @version $Revision$ -
trunk/lib/Doctrine/ClassMetadata/Exception.php
r3701 r4910 1 1 <?php 2 2 //@deprecated 3 3 class Doctrine_ClassMetadata_Exception extends Doctrine_Exception {} -
trunk/lib/Doctrine/Collection.php
r4877 r4910 23 23 24 24 /** 25 * A persistent collection of entities.25 * A persistent collection. 26 26 * 27 27 * A collection object is strongly typed in the sense that it can only contain -
trunk/lib/Doctrine/Collection/Exception.php
r3882 r4910 30 30 * @version $Revision$ 31 31 * @author Konsta Vesterinen <kvesteri@cc.hut.fi> 32 * @deprecated 32 33 */ 33 34 class Doctrine_Collection_Exception extends Doctrine_Exception -
trunk/lib/Doctrine/Collection/Iterator.php
r4364 r4910 31 31 * @version $Revision$ 32 32 * @author Konsta Vesterinen <kvesteri@cc.hut.fi> 33 * @deprecated 33 34 */ 34 35 abstract class Doctrine_Collection_Iterator implements Iterator -
trunk/lib/Doctrine/Collection/Iterator/Expandable.php
r3882 r4910 19 19 * <http://www.phpdoctrine.org>. 20 20 */ 21 Doctrine::autoload('Doctrine_Collection_Iterator'); 21 22 22 /** 23 23 * Doctrine_Collection_Iterator_Normal … … 30 30 * @version $Revision$ 31 31 * @author Konsta Vesterinen <kvesteri@cc.hut.fi> 32 * @deprecated 32 33 */ 33 34 class Doctrine_Collection_Iterator_Expandable extends Doctrine_Collection_Iterator -
trunk/lib/Doctrine/Collection/Iterator/Normal.php
r3882 r4910 19 19 * <http://www.phpdoctrine.org>. 20 20 */ 21 Doctrine::autoload('Doctrine_Collection_Iterator'); 21 22 22 /** 23 23 * Doctrine_Collection_Iterator_Normal … … 30 30 * @version $Revision$ 31 31 * @author Konsta Vesterinen <kvesteri@cc.hut.fi> 32 * @deprecated 32 33 */ 33 34 class Doctrine_Collection_Iterator_Normal extends Doctrine_Collection_Iterator -
trunk/lib/Doctrine/Collection/Iterator/Offset.php
r3882 r4910 19 19 * <http://www.phpdoctrine.org>. 20 20 */ 21 Doctrine::autoload('Doctrine_Collection_Iterator'); 21 22 22 /** 23 23 * Doctrine_Collection_Iterator_Normal … … 30 30 * @version $Revision$ 31 31 * @author Konsta Vesterinen <kvesteri@cc.hut.fi> 32 * @deprecated 32 33 */ 33 34 class Doctrine_Collection_Iterator_Offset extends Doctrine_Collection_Iterator -
trunk/lib/Doctrine/Collection/Offset.php
r4364 r4910 30 30 * @version $Revision$ 31 31 * @author Konsta Vesterinen <kvesteri@cc.hut.fi> 32 * @deprecated 32 33 */ 33 34 class Doctrine_Collection_Offset extends Doctrine_Collection -
trunk/lib/Doctrine/Compiler/Exception.php
r3882 r4910 30 30 * @since 1.0 31 31 * @version $Revision$ 32 * @deprecated 32 33 */ 33 34 class Doctrine_Compiler_Exception extends Doctrine_Exception -
trunk/lib/Doctrine/Connection.php
r4879 r4910 20 20 */ 21 21 22 #namespace Doctrine::DBAL ::Connections;22 #namespace Doctrine::DBAL; 23 23 24 24 #use Doctrine::Common::Configuration; … … 27 27 28 28 /** 29 * A thin wrapper on top of the PDO class. 30 * 31 * 1. Event listeners 32 * An easy to use, pluggable eventlistener architecture. Aspects such as 33 * logging, query profiling and caching can be easily implemented through 34 * the use of these listeners 35 * 36 * 2. Lazy-connecting 37 * Creating an instance of Doctrine_Connection does not connect 38 * to database. Connecting to database is only invoked when actually needed 39 * (for example when query() is being called) 40 * 41 * 3. Convenience methods 42 * Doctrine_Connection provides many convenience methods such as fetchAll(), fetchOne() etc. 29 * A wrapper around a Doctrine::DBAL::Connection that adds features like 30 * events, configuration, emulated transaction nesting and more. 43 31 * 44 32 * @license http://www.opensource.org/licenses/lgpl-license.php LGPL … … 65 53 * Doctrine::DBAL could ship with a simple standard broker that uses a primitive 66 54 * round-robin approach to distribution. User can provide its own brokers. 55 * @todo Rename to ConnectionWrapper 67 56 */ 68 abstractclass Doctrine_Connection57 class Doctrine_Connection 69 58 { 70 59 /** … … 114 103 */ 115 104 protected $_serverInfo = array(); 105 106 /** 107 * The transaction nesting level. 108 * 109 * @var integer 110 */ 111 protected $_transactionNestingLevel = 0; 116 112 117 113 /** … … 184 180 185 181 // create platform 186 $class = "Doctrine_D atabasePlatform_" . $this->_driverName . "Platform";182 $class = "Doctrine_DBAL_Platforms_" . $this->_driverName . "Platform"; 187 183 $this->_platform = new $class(); 188 184 $this->_platform->setQuoteIdentifiers($this->_config->getQuoteIdentifiers()); 189 185 } 190 186 187 public function __construct2(array $params, Doctrine_DBAL_Driver $driver, 188 Doctrine_Configuration $config = null, Doctrine_EventManager $eventManager = null) 189 { 190 $this->_driver = $driver; 191 $this->_params = $params; 192 193 if (isset($params['pdo'])) { 194 $this->_pdo = $params['pdo']; 195 $this->_isConnected = true; 196 } 197 198 // Create default config and event manager if none given 199 if ( ! $config) { 200 $this->_config = new Doctrine_Configuration(); 201 } 202 if ( ! $eventManager) { 203 $this->_eventManager = new Doctrine_EventManager(); 204 } 205 206 $this->_platform = $driver->getDatabasePlatform(); 207 } 208 191 209 /** 192 210 * Gets the Configuration used by the Connection. … … 233 251 return PDO::getAvailableDrivers(); 234 252 } 235 236 /**237 * returns the name of this driver238 *239 * @return string the name of this driver240 */241 public function getName()242 {243 return $this->_name;244 }245 246 /**247 * Sets the name of the connection248 *249 * @param string $name250 * @return void251 */252 public function setName($name)253 {254 $this->_name = $name;255 }256 253 257 254 /** … … 286 283 return false; 287 284 } 288 289 //$event = new Doctrine_Event($this, Doctrine_Event::CONN_CONNECT);290 //$this->getListener()->preConnect($event);291 285 292 286 // TODO: the extension_loaded check can happen earlier, maybe in the factory … … 310 304 $this->_pdo->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER); 311 305 312 // attach the pending attributes to adapter313 /*foreach($this->pendingAttributes as $attr => $value) {314 // some drivers don't support setting this so we just skip it315 if ($attr == Doctrine::ATTR_DRIVER_NAME) {316 continue;317 }318 $this->_pdo->setAttribute($attr, $value);319 }*/320 321 306 $this->_isConnected = true; 322 307 323 //$this->getListener()->postConnect($event); 308 return true; 309 } 310 311 /** 312 * Establishes the connection with the database. 313 * 314 * @return boolean 315 */ 316 public function connect2() 317 { 318 if ($this->_isConnected) { 319 return false; 320 } 321 <