Commit d458197e authored by jwage's avatar jwage

[2.0] Another step towards finishing namespace refactoring

parent 43b67919
<?php
/*
* $Id: Configurable.php 4523 2008-06-15 15:56:28Z romanb $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine::Common;
/**
* Doctrine_Configurable
*
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.phpdoctrine.org
* @since 2.0
* @version $Revision: 4523 $
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @author Roman Borschel <roman@code-factory.org>
*/
interface Doctrine_Common_Configurable
{
public function getAttribute($name);
public function setAttribute($name, $value);
public function hasAttribute($name);
}
\ No newline at end of file
...@@ -284,7 +284,7 @@ class Connection ...@@ -284,7 +284,7 @@ class Connection
/** /**
* Updates table row(s) with specified data * Updates table row(s) with specified data
* *
* @throws Doctrine_Connection_Exception if something went wrong at the database level * @throws Doctrine\DBAL\ConnectionException if something went wrong at the database level
* @param string $table The table to insert data into * @param string $table The table to insert data into
* @param array $values An associateve array containing column-value pairs. * @param array $values An associateve array containing column-value pairs.
* @return mixed boolean false if empty value array was given, * @return mixed boolean false if empty value array was given,
...@@ -509,7 +509,7 @@ class Connection ...@@ -509,7 +509,7 @@ class Connection
* @param string $query sql query * @param string $query sql query
* @param array $params query parameters * @param array $params query parameters
* *
* @return PDOStatement|Doctrine_Adapter_Statement * @return PDOStatement
*/ */
public function execute($query, array $params = array()) public function execute($query, array $params = array())
{ {
...@@ -536,7 +536,7 @@ class Connection ...@@ -536,7 +536,7 @@ class Connection
* @param string $query sql query * @param string $query sql query
* @param array $params query parameters * @param array $params query parameters
* *
* @return PDOStatement|Doctrine_Adapter_Statement * @return PDOStatement
* @todo Rename to executeUpdate(). * @todo Rename to executeUpdate().
*/ */
public function exec($query, array $params = array()) { public function exec($query, array $params = array()) {
...@@ -562,7 +562,7 @@ class Connection ...@@ -562,7 +562,7 @@ class Connection
/** /**
* Wraps the given exception into a driver-specific exception and rethrows it. * Wraps the given exception into a driver-specific exception and rethrows it.
* *
* @throws Doctrine_Connection_Exception * @throws Doctrine\DBAL\ConnectionException
*/ */
public function rethrowException(Exception $e, $invoker) public function rethrowException(Exception $e, $invoker)
{ {
...@@ -711,7 +711,7 @@ class Connection ...@@ -711,7 +711,7 @@ class Connection
* eventlistener methods * eventlistener methods
* *
* @param string $savepoint Name of a savepoint to rollback to. * @param string $savepoint Name of a savepoint to rollback to.
* @throws Doctrine_Transaction_Exception If the rollback operation fails at database level. * @throws Doctrine\DBAL\ConnectionException If the rollback operation fails at database level.
* @return boolean FALSE if rollback couldn't be performed, TRUE otherwise. * @return boolean FALSE if rollback couldn't be performed, TRUE otherwise.
*/ */
public function rollback() public function rollback()
......
...@@ -37,4 +37,3 @@ interface Driver ...@@ -37,4 +37,3 @@ interface Driver
*/ */
public function getSchemaManager(Connection $conn); public function getSchemaManager(Connection $conn);
} }
...@@ -7,7 +7,7 @@ namespace Doctrine\DBAL\Driver\PDOMsSql; ...@@ -7,7 +7,7 @@ namespace Doctrine\DBAL\Driver\PDOMsSql;
* *
* @since 2.0 * @since 2.0
*/ */
class Connection extends PDO implements \Doctrine\DBAL\Driver\Connection class Connection extends PDO implements \Doctrine\DBAL\Driver\PDOConnection
{ {
/** /**
* Performs the rollback. * Performs the rollback.
...@@ -39,4 +39,3 @@ class Connection extends PDO implements \Doctrine\DBAL\Driver\Connection ...@@ -39,4 +39,3 @@ class Connection extends PDO implements \Doctrine\DBAL\Driver\Connection
$this->exec('BEGIN TRANSACTION'); $this->exec('BEGIN TRANSACTION');
} }
} }
\ No newline at end of file
...@@ -4,14 +4,14 @@ namespace Doctrine\DBAL\Driver\PDOMsSql; ...@@ -4,14 +4,14 @@ namespace Doctrine\DBAL\Driver\PDOMsSql;
class Driver implements \Doctrine\DBAL\Driver class Driver implements \Doctrine\DBAL\Driver
{ {
public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
{ {
return new Connection( return new Connection(
$this->_constructPdoDsn($params), $this->_constructPdoDsn($params),
$username, $username,
$password, $password,
$driverOptions); $driverOptions
);
} }
/** /**
...@@ -28,13 +28,11 @@ class Driver implements \Doctrine\DBAL\Driver ...@@ -28,13 +28,11 @@ class Driver implements \Doctrine\DBAL\Driver
public function getDatabasePlatform() public function getDatabasePlatform()
{ {
return new Doctrine_DatabasePlatform_MySqlPlatform(); return new \Doctrine\DBAL\Platforms\MsSqlPlatform();
} }
public function getSchemaManager(Doctrine_Connection $conn) public function getSchemaManager(\Doctrine\DBAL\Connection $conn)
{ {
return new Doctrine_Schema_MySqlSchemaManager($conn); return new \Doctrine\DBAL\Schema\MsSqlSchemaManager($conn);
} }
} }
\ No newline at end of file
...@@ -43,7 +43,8 @@ class Driver implements \Doctrine\DBAL\Driver ...@@ -43,7 +43,8 @@ class Driver implements \Doctrine\DBAL\Driver
$this->_constructPdoDsn($params), $this->_constructPdoDsn($params),
$username, $username,
$password, $password,
$driverOptions); $driverOptions
);
$conn->setAttribute(\PDO::ATTR_AUTOCOMMIT, false); $conn->setAttribute(\PDO::ATTR_AUTOCOMMIT, false);
return $conn; return $conn;
} }
...@@ -83,6 +84,4 @@ class Driver implements \Doctrine\DBAL\Driver ...@@ -83,6 +84,4 @@ class Driver implements \Doctrine\DBAL\Driver
{ {
return new \Doctrine\DBAL\Schema\MySqlSchemaManager($conn); return new \Doctrine\DBAL\Schema\MySqlSchemaManager($conn);
} }
} }
\ No newline at end of file
...@@ -2,16 +2,18 @@ ...@@ -2,16 +2,18 @@
namespace Doctrine\DBAL\Driver\PDOOracle; namespace Doctrine\DBAL\Driver\PDOOracle;
use Doctrine\DBAL\Platforms;
class Driver implements \Doctrine\DBAL\Driver class Driver implements \Doctrine\DBAL\Driver
{ {
public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
{ {
return new \Doctrine\DBAL\Driver\PDOConnection( return new \Doctrine\DBAL\Driver\PDOConnection(
$this->_constructPdoDsn($params), $this->_constructPdoDsn($params),
$username, $username,
$password, $password,
$driverOptions); $driverOptions
);
} }
/** /**
...@@ -33,6 +35,4 @@ class Driver implements \Doctrine\DBAL\Driver ...@@ -33,6 +35,4 @@ class Driver implements \Doctrine\DBAL\Driver
{ {
return new \Doctrine\DBAL\Schema\OracleSchemaManager($conn); return new \Doctrine\DBAL\Schema\OracleSchemaManager($conn);
} }
} }
\ No newline at end of file
<?php <?php
#namespace Doctrine::DBAL::Driver::PDOPgSql; namespace Doctrine\DBAL\Driver\PDOPgSql;
use Doctrine\DBAL\Platforms;
/** /**
* Driver that connects through pdo_pgsql. * Driver that connects through pdo_pgsql.
* *
* @since 2.0 * @since 2.0
*/ */
class Doctrine_DBAL_Driver_PDOPgSql_Driver implements Doctrine_DBAL_Driver class Driver implements \Doctrine\DBAL\Driver
{ {
public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
{ {
return new Doctrine_DBAL_Driver_PDOConnection( return new \Doctrine\DBAL\Driver\PDOConnection(
$this->_constructPdoDsn($params), $this->_constructPdoDsn($params),
$username, $username,
$password, $password,
$driverOptions); $driverOptions
);
} }
/** /**
...@@ -31,14 +33,11 @@ class Doctrine_DBAL_Driver_PDOPgSql_Driver implements Doctrine_DBAL_Driver ...@@ -31,14 +33,11 @@ class Doctrine_DBAL_Driver_PDOPgSql_Driver implements Doctrine_DBAL_Driver
public function getDatabasePlatform() public function getDatabasePlatform()
{ {
return new Doctrine_DBAL_Platforms_PostgreSqlPlatform(); return new \Doctrine\DBAL\Platforms\PostgreSqlPlatform();
} }
public function getSchemaManager(Doctrine_DBAL_Connection $conn) public function getSchemaManager(\Doctrine\DBAL\Connection $conn)
{ {
return new Doctrine_DBAL_Schema_PostgreSqlSchemaManager($conn); return new \Doctrine\DBAL\Schema\PostgreSqlSchemaManager($conn);
} }
} }
\ No newline at end of file
?>
\ No newline at end of file
...@@ -2,8 +2,6 @@ ...@@ -2,8 +2,6 @@
namespace Doctrine\DBAL\Driver\PDOSqlite; namespace Doctrine\DBAL\Driver\PDOSqlite;
#use Doctrine::DBAL::Driver;
/** /**
* The PDO Sqlite driver. * The PDO Sqlite driver.
* *
...@@ -26,7 +24,8 @@ class Driver implements \Doctrine\DBAL\Driver ...@@ -26,7 +24,8 @@ class Driver implements \Doctrine\DBAL\Driver
$this->_constructPdoDsn($params), $this->_constructPdoDsn($params),
$username, $username,
$password, $password,
$driverOptions); $driverOptions
);
} }
/** /**
...@@ -65,7 +64,4 @@ class Driver implements \Doctrine\DBAL\Driver ...@@ -65,7 +64,4 @@ class Driver implements \Doctrine\DBAL\Driver
{ {
return new \Doctrine\DBAL\Schema\SqliteSchemaManager($conn); return new \Doctrine\DBAL\Schema\SqliteSchemaManager($conn);
} }
} }
\ No newline at end of file
?>
\ No newline at end of file
...@@ -67,9 +67,9 @@ interface Statement ...@@ -67,9 +67,9 @@ interface Statement
/** /**
* bindParam * bindParam
* Binds a PHP variable to a corresponding named or question mark placeholder in the * Binds a PHP variable to a corresponding named or question mark placeholder in the
* SQL statement that was use to prepare the statement. Unlike Doctrine_Adapter_Statement_Interface->bindValue(), * SQL statement that was use to prepare the statement. Unlike PDOStatement->bindValue(),
* the variable is bound as a reference and will only be evaluated at the time * the variable is bound as a reference and will only be evaluated at the time
* that Doctrine_Adapter_Statement_Interface->execute() is called. * that PDOStatement->execute() is called.
* *
* Most parameters are input parameters, that is, parameters that are * Most parameters are input parameters, that is, parameters that are
* used in a read-only fashion to build up the query. Some drivers support the invocation * used in a read-only fashion to build up the query. Some drivers support the invocation
...@@ -106,7 +106,7 @@ interface Statement ...@@ -106,7 +106,7 @@ interface Statement
* Returns the number of columns in the result set * Returns the number of columns in the result set
* *
* @return integer Returns the number of columns in the result set represented * @return integer Returns the number of columns in the result set represented
* by the Doctrine_Adapter_Statement_Interface object. If there is no result set, * by the PDOStatement object. If there is no result set,
* this method should return 0. * this method should return 0.
*/ */
public function columnCount(); public function columnCount();
...@@ -157,18 +157,18 @@ interface Statement ...@@ -157,18 +157,18 @@ interface Statement
* this value determines which row will be returned to the caller. * this value determines which row will be returned to the caller.
* This value must be one of the Query::HYDRATE_ORI_* constants, defaulting to * This value must be one of the Query::HYDRATE_ORI_* constants, defaulting to
* Query::HYDRATE_ORI_NEXT. To request a scrollable cursor for your * Query::HYDRATE_ORI_NEXT. To request a scrollable cursor for your
* Doctrine_Adapter_Statement_Interface object, * PDOStatement object,
* you must set the PDO::ATTR_CURSOR attribute to Doctrine::CURSOR_SCROLL when you * you must set the PDO::ATTR_CURSOR attribute to Doctrine::CURSOR_SCROLL when you
* prepare the SQL statement with Doctrine_Adapter_Interface->prepare(). * prepare the SQL statement with Doctrine_Adapter_Interface->prepare().
* *
* @param integer $cursorOffset For a Doctrine_Adapter_Statement_Interface object representing a scrollable cursor for which the * @param integer $cursorOffset For a PDOStatement object representing a scrollable cursor for which the
* $cursorOrientation parameter is set to Query::HYDRATE_ORI_ABS, this value specifies * $cursorOrientation parameter is set to Query::HYDRATE_ORI_ABS, this value specifies
* the absolute number of the row in the result set that shall be fetched. * the absolute number of the row in the result set that shall be fetched.
* *
* For a Doctrine_Adapter_Statement_Interface object representing a scrollable cursor for * For a PDOStatement object representing a scrollable cursor for
* which the $cursorOrientation parameter is set to Query::HYDRATE_ORI_REL, this value * which the $cursorOrientation parameter is set to Query::HYDRATE_ORI_REL, this value
* specifies the row to fetch relative to the cursor position before * specifies the row to fetch relative to the cursor position before
* Doctrine_Adapter_Statement_Interface->fetch() was called. * PDOStatement->fetch() was called.
* *
* @return mixed * @return mixed
*/ */
...@@ -197,7 +197,7 @@ interface Statement ...@@ -197,7 +197,7 @@ interface Statement
* result set or FALSE if there are no more rows. * result set or FALSE if there are no more rows.
* *
* @param integer $columnIndex 0-indexed number of the column you wish to retrieve from the row. If no * @param integer $columnIndex 0-indexed number of the column you wish to retrieve from the row. If no
* value is supplied, Doctrine_Adapter_Statement_Interface->fetchColumn() * value is supplied, PDOStatement->fetchColumn()
* fetches the first column. * fetches the first column.
* *
* @return string returns a single column in the next row of a result set. * @return string returns a single column in the next row of a result set.
...@@ -209,7 +209,7 @@ interface Statement ...@@ -209,7 +209,7 @@ interface Statement
* Fetches the next row and returns it as an object. * Fetches the next row and returns it as an object.
* *
* Fetches the next row and returns it as an object. This function is an alternative to * Fetches the next row and returns it as an object. This function is an alternative to
* Doctrine_Adapter_Statement_Interface->fetch() with Query::HYDRATE_CLASS or Query::HYDRATE_OBJ style. * PDOStatement->fetch() with Query::HYDRATE_CLASS or Query::HYDRATE_OBJ style.
* *
* @param string $className Name of the created class, defaults to stdClass. * @param string $className Name of the created class, defaults to stdClass.
* @param array $args Elements of this array are passed to the constructor. * @param array $args Elements of this array are passed to the constructor.
......
...@@ -151,4 +151,3 @@ final class DriverManager ...@@ -151,4 +151,3 @@ final class DriverManager
} }
} }
} }
...@@ -1954,5 +1954,3 @@ abstract class AbstractPlatform ...@@ -1954,5 +1954,3 @@ abstract class AbstractPlatform
*/ */
abstract public function getVarcharDeclarationSql(array $field); abstract public function getVarcharDeclarationSql(array $field);
} }
...@@ -4,11 +4,8 @@ namespace Doctrine\DBAL\Platforms; ...@@ -4,11 +4,8 @@ namespace Doctrine\DBAL\Platforms;
class Db2Platform extends AbstractPlatform class Db2Platform extends AbstractPlatform
{ {
public function getSequenceNextValSql($sequenceName) { public function getSequenceNextValSql($sequenceName) {
return 'SELECT NEXTVAL FOR ' . $this->quoteIdentifier($sequenceName) return 'SELECT NEXTVAL FOR ' . $this->quoteIdentifier($sequenceName)
. ' FROM SYSIBM.SYSDUMMY1'; . ' FROM SYSIBM.SYSDUMMY1';
} }
} }
\ No newline at end of file
...@@ -9,7 +9,6 @@ namespace Doctrine\DBAL\Platforms; ...@@ -9,7 +9,6 @@ namespace Doctrine\DBAL\Platforms;
*/ */
class FirebirdPlatform extends AbstractPlatform class FirebirdPlatform extends AbstractPlatform
{ {
/** /**
* Constructor. * Constructor.
*/ */
...@@ -289,7 +288,4 @@ class FirebirdPlatform extends AbstractPlatform ...@@ -289,7 +288,4 @@ class FirebirdPlatform extends AbstractPlatform
{ {
return 'SET TRANSACTION ISOLATION LEVEL ' . $this->_getTransactionIsolationLevelSql($level); return 'SET TRANSACTION ISOLATION LEVEL ' . $this->_getTransactionIsolationLevelSql($level);
} }
} }
\ No newline at end of file
?>
\ No newline at end of file
...@@ -9,7 +9,6 @@ namespace Doctrine\DBAL\Platforms; ...@@ -9,7 +9,6 @@ namespace Doctrine\DBAL\Platforms;
*/ */
class InformixPlatform extends AbstractPlatform class InformixPlatform extends AbstractPlatform
{ {
public function __construct() public function __construct()
{ {
parent::__construct(); parent::__construct();
...@@ -92,7 +91,4 @@ class InformixPlatform extends AbstractPlatform ...@@ -92,7 +91,4 @@ class InformixPlatform extends AbstractPlatform
} }
throw \Doctrine\Common\DoctrineException::updateMe('Unknown field type \'' . $field['type'] . '\'.'); throw \Doctrine\Common\DoctrineException::updateMe('Unknown field type \'' . $field['type'] . '\'.');
} }
} }
\ No newline at end of file
?>
\ No newline at end of file
...@@ -6,4 +6,3 @@ class MockPlatform extends AbstractPlatform ...@@ -6,4 +6,3 @@ class MockPlatform extends AbstractPlatform
public function getNativeDeclaration(array $field) {} public function getNativeDeclaration(array $field) {}
public function getPortableDeclaration(array $field) {} public function getPortableDeclaration(array $field) {}
} }
...@@ -323,5 +323,3 @@ class MsSqlPlatform extends AbstractPlatform ...@@ -323,5 +323,3 @@ class MsSqlPlatform extends AbstractPlatform
} }
} }
?>
\ No newline at end of file
...@@ -1260,5 +1260,3 @@ class MySqlPlatform extends AbstractPlatform ...@@ -1260,5 +1260,3 @@ class MySqlPlatform extends AbstractPlatform
return 'SET SESSION TRANSACTION ISOLATION LEVEL ' . $this->_getTransactionIsolationLevelSql($level); return 'SET SESSION TRANSACTION ISOLATION LEVEL ' . $this->_getTransactionIsolationLevelSql($level);
} }
} }
?>
\ No newline at end of file
...@@ -376,5 +376,3 @@ class OraclePlatform extends AbstractPlatform ...@@ -376,5 +376,3 @@ class OraclePlatform extends AbstractPlatform
} }
} }
} }
?>
\ No newline at end of file
...@@ -833,7 +833,7 @@ class PostgreSqlPlatform extends AbstractPlatform ...@@ -833,7 +833,7 @@ class PostgreSqlPlatform extends AbstractPlatform
/** /**
* return RDBMS specific create sequence statement * return RDBMS specific create sequence statement
* *
* @throws Doctrine_Connection_Exception if something fails at database level * @throws Doctrine\DBAL\ConnectionException if something fails at database level
* @param string $seqName name of the sequence to be created * @param string $seqName name of the sequence to be created
* @param string $start start value of the sequence; default is 1 * @param string $start start value of the sequence; default is 1
* @param array $options An associative array of table options: * @param array $options An associative array of table options:
...@@ -1002,5 +1002,3 @@ class PostgreSqlPlatform extends AbstractPlatform ...@@ -1002,5 +1002,3 @@ class PostgreSqlPlatform extends AbstractPlatform
. $this->_getTransactionIsolationLevelSql($level); . $this->_getTransactionIsolationLevelSql($level);
} }
} }
\ No newline at end of file
?>
\ No newline at end of file
...@@ -29,7 +29,6 @@ namespace Doctrine\DBAL\Platforms; ...@@ -29,7 +29,6 @@ namespace Doctrine\DBAL\Platforms;
*/ */
class SqlitePlatform extends AbstractPlatform class SqlitePlatform extends AbstractPlatform
{ {
/** /**
* the constructor * the constructor
*/ */
...@@ -565,4 +564,3 @@ class SqlitePlatform extends AbstractPlatform ...@@ -565,4 +564,3 @@ class SqlitePlatform extends AbstractPlatform
return false; return false;
} }
} }
\ No newline at end of file
...@@ -228,7 +228,7 @@ abstract class AbstractSchemaManager ...@@ -228,7 +228,7 @@ abstract class AbstractSchemaManager
* drop existing sequence * drop existing sequence
* (this method is implemented by the drivers) * (this method is implemented by the drivers)
* *
* @throws Doctrine_Connection_Exception if something fails at database level * @throws Doctrine\DBAL\ConnectionException if something fails at database level
* @param string $sequenceName name of the sequence to be dropped * @param string $sequenceName name of the sequence to be dropped
* @return void * @return void
*/ */
...@@ -285,7 +285,7 @@ abstract class AbstractSchemaManager ...@@ -285,7 +285,7 @@ abstract class AbstractSchemaManager
/** /**
* create sequence * create sequence
* *
* @throws Doctrine_Connection_Exception if something fails at database level * @throws Doctrine\DBAL\ConnectionException if something fails at database level
* @param string $seqName name of the sequence to be created * @param string $seqName name of the sequence to be created
* @param string $start start value of the sequence; default is 1 * @param string $start start value of the sequence; default is 1
* @param array $options An associative array of table options: * @param array $options An associative array of table options:
...@@ -477,5 +477,3 @@ abstract class AbstractSchemaManager ...@@ -477,5 +477,3 @@ abstract class AbstractSchemaManager
} }
} }
} }
\ No newline at end of file
?>
\ No newline at end of file
...@@ -614,10 +614,10 @@ class FirebirdSchemaManager extends AbstractSchemaManager ...@@ -614,10 +614,10 @@ class FirebirdSchemaManager extends AbstractSchemaManager
$this->_conn->exec('SET GENERATOR ' . $sequenceName . ' TO ' . ($start-1)); $this->_conn->exec('SET GENERATOR ' . $sequenceName . ' TO ' . ($start-1));
return true; return true;
} catch (Doctrine_Connection_Exception $e) { } catch (Doctrine\DBAL\ConnectionException $e) {
try { try {
$this->dropSequence($seqName); $this->dropSequence($seqName);
} catch(Doctrine_Connection_Exception $e) { } catch(Doctrine\DBAL\ConnectionException $e) {
throw \Doctrine\Common\DoctrineException::updateMe('Could not drop inconsistent sequence table'); throw \Doctrine\Common\DoctrineException::updateMe('Could not drop inconsistent sequence table');
} }
} }
...@@ -638,7 +638,4 @@ class FirebirdSchemaManager extends AbstractSchemaManager ...@@ -638,7 +638,4 @@ class FirebirdSchemaManager extends AbstractSchemaManager
return $query; return $query;
} }
} }
\ No newline at end of file
?>
\ No newline at end of file
...@@ -53,9 +53,4 @@ class InformixSchemaManager extends AbstractSchemaManager ...@@ -53,9 +53,4 @@ class InformixSchemaManager extends AbstractSchemaManager
and i.idxname=s.idxname and tr.tabid=r.ptabid and i.idxname=s.idxname and tr.tabid=r.ptabid
and s2.constrid=r.primary and i2.idxname=s2.idxname", and s2.constrid=r.primary and i2.idxname=s2.idxname",
); );
} }
\ No newline at end of file
...@@ -417,7 +417,4 @@ class MsSqlSchemaManager extends AbstractSchemaManager ...@@ -417,7 +417,4 @@ class MsSqlSchemaManager extends AbstractSchemaManager
return $this->conn->fetchColumn($query); return $this->conn->fetchColumn($query);
} }
} }
\ No newline at end of file
?>
\ No newline at end of file
...@@ -279,7 +279,7 @@ class MySqlSchemaManager extends AbstractSchemaManager ...@@ -279,7 +279,7 @@ class MySqlSchemaManager extends AbstractSchemaManager
} }
$res = $this->_conn->exec($query); $res = $this->_conn->exec($query);
} catch(Doctrine_Connection_Exception $e) { } catch(Doctrine\DBAL\ConnectionException $e) {
throw \Doctrine\Common\DoctrineException::updateMe('could not create sequence table'); throw \Doctrine\Common\DoctrineException::updateMe('could not create sequence table');
} }
...@@ -295,7 +295,7 @@ class MySqlSchemaManager extends AbstractSchemaManager ...@@ -295,7 +295,7 @@ class MySqlSchemaManager extends AbstractSchemaManager
// Handle error // Handle error
try { try {
$res = $this->_conn->exec('DROP TABLE ' . $sequenceName); $res = $this->_conn->exec('DROP TABLE ' . $sequenceName);
} catch(Doctrine_Connection_Exception $e) { } catch(Doctrine\DBAL\ConnectionException $e) {
throw \Doctrine\Common\DoctrineException::updateMe('could not drop inconsistent sequence table'); throw \Doctrine\Common\DoctrineException::updateMe('could not drop inconsistent sequence table');
} }
...@@ -316,7 +316,4 @@ class MySqlSchemaManager extends AbstractSchemaManager ...@@ -316,7 +316,4 @@ class MySqlSchemaManager extends AbstractSchemaManager
$name = $this->_conn->quoteIdentifier($name); $name = $this->_conn->quoteIdentifier($name);
return $this->_conn->exec('ALTER TABLE ' . $table . ' DROP FOREIGN KEY ' . $name); return $this->_conn->exec('ALTER TABLE ' . $table . ' DROP FOREIGN KEY ' . $name);
} }
} }
\ No newline at end of file
?>
\ No newline at end of file
...@@ -704,7 +704,4 @@ END; ...@@ -704,7 +704,4 @@ END;
$query = 'SELECT view_name FROM sys.user_views'; $query = 'SELECT view_name FROM sys.user_views';
return $this->_conn->fetchColumn($query); return $this->_conn->fetchColumn($query);
} }
} }
\ No newline at end of file
?>
\ No newline at end of file
...@@ -118,7 +118,7 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager ...@@ -118,7 +118,7 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
* @param boolean $check indicates whether the function should just check if the DBMS driver * @param boolean $check indicates whether the function should just check if the DBMS driver
* can perform the requested table alterations if the value is true or * can perform the requested table alterations if the value is true or
* actually perform them otherwise. * actually perform them otherwise.
* @throws Doctrine_Connection_Exception * @throws Doctrine\DBAL\ConnectionException
* @return boolean * @return boolean
*/ */
public function alterTable($name, array $changes, $check = false) public function alterTable($name, array $changes, $check = false)
...@@ -261,5 +261,3 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager ...@@ -261,5 +261,3 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager
return $this->_conn->fetchColumn($query); return $this->_conn->fetchColumn($query);
} }
} }
\ No newline at end of file
?>
\ No newline at end of file
...@@ -428,12 +428,12 @@ class SqliteSchemaManager extends AbstractSchemaManager ...@@ -428,12 +428,12 @@ class SqliteSchemaManager extends AbstractSchemaManager
try { try {
$this->_conn->exec('INSERT INTO ' . $sequenceName . ' (' . $seqcolName . ') VALUES (' . ($start-1) . ')'); $this->_conn->exec('INSERT INTO ' . $sequenceName . ' (' . $seqcolName . ') VALUES (' . ($start-1) . ')');
return true; return true;
} catch(Doctrine_Connection_Exception $e) { } catch(Doctrine\DBAL\ConnectionException $e) {
// Handle error // Handle error
try { try {
$result = $db->exec('DROP TABLE ' . $sequenceName); $result = $db->exec('DROP TABLE ' . $sequenceName);
} catch(Doctrine_Connection_Exception $e) { } catch(Doctrine\DBAL\ConnectionException $e) {
throw \Doctrine\Common\DoctrineException::updateMe('could not drop inconsistent sequence table'); throw \Doctrine\Common\DoctrineException::updateMe('could not drop inconsistent sequence table');
} }
} }
...@@ -588,4 +588,3 @@ class SqliteSchemaManager extends AbstractSchemaManager ...@@ -588,4 +588,3 @@ class SqliteSchemaManager extends AbstractSchemaManager
return $name . ' ' . $type . $unsigned . $default . $notnull . $autoinc; return $name . ' ' . $type . $unsigned . $default . $notnull . $autoinc;
} }
} }
\ No newline at end of file
...@@ -125,9 +125,9 @@ class Statement ...@@ -125,9 +125,9 @@ class Statement
/** /**
* Binds a PHP variable to a corresponding named or question mark placeholder in the * Binds a PHP variable to a corresponding named or question mark placeholder in the
* SQL statement that was use to prepare the statement. Unlike Doctrine_Adapter_Statement_Interface->bindValue(), * SQL statement that was use to prepare the statement. Unlike PDOStatement->bindValue(),
* the variable is bound as a reference and will only be evaluated at the time * the variable is bound as a reference and will only be evaluated at the time
* that Doctrine_Adapter_Statement_Interface->execute() is called. * that PDOStatement->execute() is called.
* *
* Most parameters are input parameters, that is, parameters that are * Most parameters are input parameters, that is, parameters that are
* used in a read-only fashion to build up the query. Some drivers support the invocation * used in a read-only fashion to build up the query. Some drivers support the invocation
...@@ -172,7 +172,7 @@ class Statement ...@@ -172,7 +172,7 @@ class Statement
* Returns the number of columns in the result set * Returns the number of columns in the result set
* *
* @return integer Returns the number of columns in the result set represented * @return integer Returns the number of columns in the result set represented
* by the Doctrine_Adapter_Statement_Interface object. If there is no result set, * by the PDOStatement object. If there is no result set,
* this method should return 0. * this method should return 0.
*/ */
public function columnCount() public function columnCount()
...@@ -250,18 +250,18 @@ class Statement ...@@ -250,18 +250,18 @@ class Statement
* this value determines which row will be returned to the caller. * this value determines which row will be returned to the caller.
* This value must be one of the Query::HYDRATE_ORI_* constants, defaulting to * This value must be one of the Query::HYDRATE_ORI_* constants, defaulting to
* Query::HYDRATE_ORI_NEXT. To request a scrollable cursor for your * Query::HYDRATE_ORI_NEXT. To request a scrollable cursor for your
* Doctrine_Adapter_Statement_Interface object, * PDOStatement object,
* you must set the PDO::ATTR_CURSOR attribute to Doctrine::CURSOR_SCROLL when you * you must set the PDO::ATTR_CURSOR attribute to Doctrine::CURSOR_SCROLL when you
* prepare the SQL statement with Doctrine_Adapter_Interface->prepare(). * prepare the SQL statement with Doctrine_Adapter_Interface->prepare().
* *
* @param integer $cursorOffset For a Doctrine_Adapter_Statement_Interface object representing a scrollable cursor for which the * @param integer $cursorOffset For a PDOStatement object representing a scrollable cursor for which the
* $cursorOrientation parameter is set to Query::HYDRATE_ORI_ABS, this value specifies * $cursorOrientation parameter is set to Query::HYDRATE_ORI_ABS, this value specifies
* the absolute number of the row in the result set that shall be fetched. * the absolute number of the row in the result set that shall be fetched.
* *
* For a Doctrine_Adapter_Statement_Interface object representing a scrollable cursor for * For a PDOStatement object representing a scrollable cursor for
* which the $cursorOrientation parameter is set to Query::HYDRATE_ORI_REL, this value * which the $cursorOrientation parameter is set to Query::HYDRATE_ORI_REL, this value
* specifies the row to fetch relative to the cursor position before * specifies the row to fetch relative to the cursor position before
* Doctrine_Adapter_Statement_Interface->fetch() was called. * PDOStatement->fetch() was called.
* *
* @return mixed * @return mixed
*/ */
...@@ -323,7 +323,7 @@ class Statement ...@@ -323,7 +323,7 @@ class Statement
* result set or FALSE if there are no more rows. * result set or FALSE if there are no more rows.
* *
* @param integer $columnIndex 0-indexed number of the column you wish to retrieve from the row. If no * @param integer $columnIndex 0-indexed number of the column you wish to retrieve from the row. If no
* value is supplied, Doctrine_Adapter_Statement_Interface->fetchColumn() * value is supplied, PDOStatement->fetchColumn()
* fetches the first column. * fetches the first column.
* *
* @return string returns a single column in the next row of a result set. * @return string returns a single column in the next row of a result set.
...@@ -337,7 +337,7 @@ class Statement ...@@ -337,7 +337,7 @@ class Statement
* Fetches the next row and returns it as an object. * Fetches the next row and returns it as an object.
* *
* Fetches the next row and returns it as an object. This function is an alternative to * Fetches the next row and returns it as an object. This function is an alternative to
* Doctrine_Adapter_Statement_Interface->fetch() with Query::HYDRATE_CLASS or Query::HYDRATE_OBJ style. * PDOStatement->fetch() with Query::HYDRATE_CLASS or Query::HYDRATE_OBJ style.
* *
* @param string $className Name of the created class, defaults to stdClass. * @param string $className Name of the created class, defaults to stdClass.
* @param array $args Elements of this array are passed to the constructor. * @param array $args Elements of this array are passed to the constructor.
......
...@@ -9,11 +9,8 @@ namespace Doctrine\DBAL\Types; ...@@ -9,11 +9,8 @@ namespace Doctrine\DBAL\Types;
*/ */
class ArrayType extends Type class ArrayType extends Type
{ {
public function getName() public function getName()
{ {
return 'Array'; return 'Array';
} }
} }
\ No newline at end of file
...@@ -11,4 +11,3 @@ class BigIntType extends Type ...@@ -11,4 +11,3 @@ class BigIntType extends Type
{ {
//put your code here //put your code here
} }
...@@ -31,4 +31,3 @@ class BooleanType extends Type ...@@ -31,4 +31,3 @@ class BooleanType extends Type
return (bool)$value; return (bool)$value;
} }
} }
...@@ -11,4 +11,3 @@ class CharType ...@@ -11,4 +11,3 @@ class CharType
{ {
//put your code here //put your code here
} }
...@@ -33,5 +33,3 @@ class DateTimeType extends Type ...@@ -33,5 +33,3 @@ class DateTimeType extends Type
return new DateTime($value); return new DateTime($value);
} }
} }
?>
\ No newline at end of file
...@@ -10,4 +10,3 @@ class DecimalType extends Type ...@@ -10,4 +10,3 @@ class DecimalType extends Type
{ {
} }
...@@ -8,7 +8,6 @@ namespace Doctrine\DBAL\Types; ...@@ -8,7 +8,6 @@ namespace Doctrine\DBAL\Types;
*/ */
class IntegerType extends Type class IntegerType extends Type
{ {
public function getName() public function getName()
{ {
return "Integer"; return "Integer";
......
...@@ -11,4 +11,3 @@ class MediumIntType ...@@ -11,4 +11,3 @@ class MediumIntType
{ {
//put your code here //put your code here
} }
...@@ -11,4 +11,3 @@ class SmallIntType ...@@ -11,4 +11,3 @@ class SmallIntType
{ {
//put your code here //put your code here
} }
...@@ -14,6 +14,4 @@ class TextType extends Type ...@@ -14,6 +14,4 @@ class TextType extends Type
{ {
return $platform->getClobDeclarationSql($fieldDeclaration); return $platform->getClobDeclarationSql($fieldDeclaration);
} }
} }
\ No newline at end of file
...@@ -11,4 +11,3 @@ class TinyIntType ...@@ -11,4 +11,3 @@ class TinyIntType
{ {
//put your code here //put your code here
} }
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
namespace Doctrine\DBAL\Types; namespace Doctrine\DBAL\Types;
#use Doctrine\DBAL\Platforms\AbstractDatabasePlatform; use Doctrine\DBAL\Platforms\AbstractPlatform;
abstract class Type abstract class Type
{ {
...@@ -91,4 +91,3 @@ abstract class Type ...@@ -91,4 +91,3 @@ abstract class Type
self::$_typesMap[$name] = $className; self::$_typesMap[$name] = $className;
} }
} }
\ No newline at end of file
...@@ -22,6 +22,8 @@ class VarcharType extends Type ...@@ -22,6 +22,8 @@ class VarcharType extends Type
} }
/** @override */ /** @override */
public function getName() { return 'Varchar'; } public function getName()
{
return 'Varchar';
}
} }
\ No newline at end of file
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine::ORM::Exceptions;
/**
* Doctrine_Exception
*
* @package Doctrine
* @subpackage Exception
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.phpdoctrine.org
* @since 1.0
* @version $Revision$
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @author Roman Borschel <roman@code-factory.org>
* @todo Rename to DoctrineException
*/
class Doctrine_Exception extends Exception
{
private $_innerException;
public function __construct($message = "", Doctrine_Exception $innerException = null)
{
parent::__construct($message);
$this->_innerException = $innerException;
}
public function getInnerException()
{
return $this->_innerException;
}
public static function notYetImplemented($method, $class)
{
return new self("The method '$method' is not implemented in the class '$class'.");
}
}
...@@ -37,6 +37,4 @@ final class Events ...@@ -37,6 +37,4 @@ final class Events
const postDelete = 'postDelete'; const postDelete = 'postDelete';
const preSave = 'preSave'; const preSave = 'preSave';
const postSave = 'postSave'; const postSave = 'postSave';
} }
\ No newline at end of file
...@@ -31,8 +31,8 @@ abstract class AbstractIdGenerator ...@@ -31,8 +31,8 @@ abstract class AbstractIdGenerator
* *
* @return boolean * @return boolean
*/ */
public function isPostInsertGenerator() { public function isPostInsertGenerator()
{
return false; return false;
} }
} }
\ No newline at end of file
...@@ -67,4 +67,3 @@ class Assigned extends AbstractIdGenerator ...@@ -67,4 +67,3 @@ class Assigned extends AbstractIdGenerator
return $identifier; return $identifier;
} }
} }
...@@ -20,8 +20,8 @@ class IdentityGenerator extends AbstractIdGenerator ...@@ -20,8 +20,8 @@ class IdentityGenerator extends AbstractIdGenerator
* @return boolean * @return boolean
* @override * @override
*/ */
public function isPostInsertGenerator() { public function isPostInsertGenerator()
{
return true; return true;
} }
} }
\ No newline at end of file
...@@ -24,4 +24,3 @@ class SequenceGenerator extends AbstractIdGenerator ...@@ -24,4 +24,3 @@ class SequenceGenerator extends AbstractIdGenerator
return $conn->fetchOne($sql); return $conn->fetchOne($sql);
} }
} }
...@@ -21,6 +21,4 @@ class SequenceIdentityGenerator extends IdentityGenerator ...@@ -21,6 +21,4 @@ class SequenceIdentityGenerator extends IdentityGenerator
{ {
return $this->_em->getConnection()->lastInsertId($this->_sequenceName); return $this->_em->getConnection()->lastInsertId($this->_sequenceName);
} }
} }
\ No newline at end of file
...@@ -9,11 +9,8 @@ namespace Doctrine\ORM\Id; ...@@ -9,11 +9,8 @@ namespace Doctrine\ORM\Id;
*/ */
class TableGenerator extends AbstractIdGenerator class TableGenerator extends AbstractIdGenerator
{ {
public function generate($entity) public function generate($entity)
{ {
throw \Doctrine\Common\DoctrineException::updateMe("Not implemented"); throw \Doctrine\Common\DoctrineException::updateMe("Not implemented");
} }
} }
\ No newline at end of file
<?php
/*
* $Id: Exception.php 3882 2008-02-22 18:11:35Z jwage $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.org>.
*/
/**
* class Doctrine_Import_Exception
*
* @package Doctrine
* @subpackage Import
* @link www.phpdoctrine.org
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @since 1.0
* @version $Revision: 3882 $
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class Doctrine_Import_Exception extends Doctrine_Exception
{ }
\ No newline at end of file
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
* <http://www.phpdoctrine.org>. * <http://www.phpdoctrine.org>.
*/ */
namespace Doctrine\ORM\Import\Reader;
/** /**
* class Doctrine_Import_Reader * class Doctrine_Import_Reader
* Is responsible of reading a database definitions from a source and costructing a * Is responsible of reading a database definitions from a source and costructing a
...@@ -32,21 +34,7 @@ ...@@ -32,21 +34,7 @@
* @version $Revision: 3882 $ * @version $Revision: 3882 $
* @author Konsta Vesterinen <kvesteri@cc.hut.fi> * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/ */
abstract class Doctrine_Import_Reader abstract class AbstractRader
{ {
abstract public function read();
/** Aggregations: */
/** Compositions: */
/*** Attributes: ***/
/**
*
* @return Doctrine_Schema
* @abstract
* @access public
*/
abstract public function read( );
} }
\ No newline at end of file
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
* <http://www.phpdoctrine.org>. * <http://www.phpdoctrine.org>.
*/ */
namespace Doctrine\ORM\Import\Reader;
/** /**
* class Doctrine_Import_Reader_Db * class Doctrine_Import_Reader_Db
* Reads a database using the given PDO connection and constructs a database * Reads a database using the given PDO connection and constructs a database
...@@ -32,14 +34,8 @@ ...@@ -32,14 +34,8 @@
* @version $Revision: 3882 $ * @version $Revision: 3882 $
* @author Konsta Vesterinen <kvesteri@cc.hut.fi> * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/ */
class Doctrine_Import_Reader_Db extends Doctrine_Import_Reader class Db extends AbstractReader
{ {
/** Aggregations: */
/** Compositions: */
/*** Attributes: ***/
/** /**
* @access private * @access private
*/ */
......
<?php
/*
* $Id: Exception.php 3882 2008-02-22 18:11:35Z jwage $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.org>.
*/
/**
* class Doctrine_Import_Reader_Exception
*
* @package Doctrine
* @subpackage Import
* @link www.phpdoctrine.org
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @since 1.0
* @version $Revision: 3882 $
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class Doctrine_Import_Reader_Exception
{
/** Aggregations: */
/** Compositions: */
/*** Attributes: ***/
}
\ No newline at end of file
...@@ -18,7 +18,9 @@ ...@@ -18,7 +18,9 @@
* and is licensed under the LGPL. For more information, see * and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.org>. * <http://www.phpdoctrine.org>.
*/ */
Doctrine::autoload('Doctrine_Import_Reader');
namespace Doctrine\ORM\Import\Reader;
/** /**
* class Doctrine_Import_Reader_Xml_Propel * class Doctrine_Import_Reader_Xml_Propel
* *
...@@ -30,15 +32,8 @@ Doctrine::autoload('Doctrine_Import_Reader'); ...@@ -30,15 +32,8 @@ Doctrine::autoload('Doctrine_Import_Reader');
* @version $Revision: 3882 $ * @version $Revision: 3882 $
* @author Konsta Vesterinen <kvesteri@cc.hut.fi> * @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/ */
class Doctrine_Import_Reader_Xml_Propel extends Doctrine_Import_Reader class Propel extends AbstractReader
{ {
/** Aggregations: */
/** Compositions: */
/*** Attributes: ***/
/** /**
* @access private * @access private
*/ */
......
...@@ -146,5 +146,3 @@ class CommitOrderCalculator ...@@ -146,5 +146,3 @@ class CommitOrderCalculator
array_unshift($this->_sorted, $node->getClass()); array_unshift($this->_sorted, $node->getClass());
} }
} }
?>
\ No newline at end of file
...@@ -162,4 +162,3 @@ class CommitOrderNode ...@@ -162,4 +162,3 @@ class CommitOrderNode
$this->_relatedNodes[] = $node; $this->_relatedNodes[] = $node;
} }
} }
...@@ -209,4 +209,3 @@ class ArrayHydrator extends AbstractHydrator ...@@ -209,4 +209,3 @@ class ArrayHydrator extends AbstractHydrator
return array(); return array();
} }
} }
<?php
/*
* $Id: Exception.php 1080 2007-02-10 18:17:08Z romanb $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.org>.
*/
/**
* Doctrine_Hydrator_Exception
*
* @package Doctrine
* @subpackage Hydrate
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.phpdoctrine.org
* @since 1.0
* @version $Revision: 1080 $
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class Doctrine_Hydrator_Exception extends Doctrine_Exception
{
public static function nonUniqueKeyMapping()
{
return new self("Hydration failed. Found non-unique key mapping.");
}
public static function nonExistantFieldUsedAsIndex($field)
{
return new self("Hydration failed. Found a non-existent field '$field'.");
}
public static function nonUniqueResult()
{
return new self("Hydration failed. Non-unique result returned.");
}
}
\ No newline at end of file
...@@ -4,11 +4,8 @@ namespace Doctrine\ORM\Internal\Hydration; ...@@ -4,11 +4,8 @@ namespace Doctrine\ORM\Internal\Hydration;
class HydrationException extends \Doctrine\Common\DoctrineException class HydrationException extends \Doctrine\Common\DoctrineException
{ {
public static function nonUniqueResult() public static function nonUniqueResult()
{ {
return new self("The result returned by the query was not unique."); return new self("The result returned by the query was not unique.");
} }
} }
\ No newline at end of file
...@@ -47,4 +47,3 @@ class IterableResult ...@@ -47,4 +47,3 @@ class IterableResult
return $this->_hydrator->hydrateRow(); return $this->_hydrator->hydrateRow();
} }
} }
...@@ -396,4 +396,3 @@ class ObjectHydrator extends AbstractHydrator ...@@ -396,4 +396,3 @@ class ObjectHydrator extends AbstractHydrator
return new \Doctrine\Common\Collections\Collection; return new \Doctrine\Common\Collections\Collection;
} }
} }
...@@ -37,4 +37,3 @@ class ScalarHydrator extends AbstractHydrator ...@@ -37,4 +37,3 @@ class ScalarHydrator extends AbstractHydrator
return array(); return array();
} }
} }
...@@ -34,4 +34,3 @@ class SingleScalarHydrator extends AbstractHydrator ...@@ -34,4 +34,3 @@ class SingleScalarHydrator extends AbstractHydrator
return array(); return array();
} }
} }
...@@ -340,4 +340,3 @@ abstract class AssociationMapping ...@@ -340,4 +340,3 @@ abstract class AssociationMapping
abstract public function lazyLoadFor($entity, $entityManager); abstract public function lazyLoadFor($entity, $entityManager);
} }
...@@ -1477,4 +1477,3 @@ final class ClassMetadata ...@@ -1477,4 +1477,3 @@ final class ClassMetadata
return __CLASS__ . '@' . spl_object_hash($this); return __CLASS__ . '@' . spl_object_hash($this);
} }
} }
...@@ -206,6 +206,3 @@ class ClassMetadataFactory ...@@ -206,6 +206,3 @@ class ClassMetadataFactory
} }
} }
} }
...@@ -142,4 +142,3 @@ class ManyToManyMapping extends AssociationMapping ...@@ -142,4 +142,3 @@ class ManyToManyMapping extends AssociationMapping
return true; return true;
} }
} }
...@@ -84,5 +84,3 @@ class MappingException extends \Doctrine\Common\DoctrineException ...@@ -84,5 +84,3 @@ class MappingException extends \Doctrine\Common\DoctrineException
return new self("The mapping of field '$fieldName' is invalid."); return new self("The mapping of field '$fieldName' is invalid.");
} }
} }
?>
\ No newline at end of file
...@@ -112,6 +112,4 @@ class OneToManyMapping extends AssociationMapping ...@@ -112,6 +112,4 @@ class OneToManyMapping extends AssociationMapping
{ {
} }
} }
\ No newline at end of file
...@@ -163,6 +163,4 @@ class OneToOneMapping extends AssociationMapping ...@@ -163,6 +163,4 @@ class OneToOneMapping extends AssociationMapping
} }
$sourceClass->getReflectionProperty($this->_sourceFieldName)->setValue($entity, $otherEntity); $sourceClass->getReflectionProperty($this->_sourceFieldName)->setValue($entity, $otherEntity);
} }
} }
\ No newline at end of file
...@@ -161,4 +161,3 @@ abstract class AbstractCollectionPersister ...@@ -161,4 +161,3 @@ abstract class AbstractCollectionPersister
*/ */
abstract protected function _getInsertRowSqlParameters(PersistentCollection $coll, $element); abstract protected function _getInsertRowSqlParameters(PersistentCollection $coll, $element);
} }
...@@ -30,4 +30,3 @@ class ElementCollectionPersister extends AbstractCollectionPersister ...@@ -30,4 +30,3 @@ class ElementCollectionPersister extends AbstractCollectionPersister
{ {
//put your code here //put your code here
} }
<?php
/*
* $Id$
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
* A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
* LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
* DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
* THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
* This software consists of voluntary contributions made by many individuals
* and is licensed under the LGPL. For more information, see
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine::ORM;
/**
* Doctrine_EntityPersister_Exception
*
* @package Doctrine
* @subpackage Entity
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @author Roman Borschel <roman@code-factory.org>
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.phpdoctrine.org
* @since 2.0
* @version $Revision$
*/
class Doctrine_EntityPersister_Exception extends Doctrine_Exception
{
}
\ No newline at end of file
...@@ -278,4 +278,3 @@ class JoinedSubclassPersister extends AbstractEntityPersister ...@@ -278,4 +278,3 @@ class JoinedSubclassPersister extends AbstractEntityPersister
return $dataSet; return $dataSet;
} }
} }
...@@ -127,4 +127,3 @@ class ManyToManyPersister extends AbstractCollectionPersister ...@@ -127,4 +127,3 @@ class ManyToManyPersister extends AbstractCollectionPersister
return $this->_uow->getEntityIdentifier($coll->getOwner()); return $this->_uow->getEntityIdentifier($coll->getOwner());
} }
} }
...@@ -73,6 +73,4 @@ class OneToManyPersister extends AbstractCollectionPersister ...@@ -73,6 +73,4 @@ class OneToManyPersister extends AbstractCollectionPersister
{ {
return; return;
} }
} }
\ No newline at end of file
<?php <?php
?> namespace Doctrine\ORM\Persisters;
\ No newline at end of file
class SingleTablePersister extends AbstractEntityPersister
{
}
\ No newline at end of file
<?php <?php
?> namespace Doctrine\ORM\Persisters;
\ No newline at end of file
class UnionSubclassPersister extends AbstractEntityPersister
{
}
\ No newline at end of file
...@@ -39,4 +39,3 @@ class AggregateExpression extends Node ...@@ -39,4 +39,3 @@ class AggregateExpression extends Node
return $this->_functionName; return $this->_functionName;
} }
} }
...@@ -18,13 +18,17 @@ class ArithmeticExpression extends Node ...@@ -18,13 +18,17 @@ class ArithmeticExpression extends Node
public function setSimpleArithmeticExpression($simpleArithmeticExpr) public function setSimpleArithmeticExpression($simpleArithmeticExpr)
{ {
if ($this->_subselect) throw \Doctrine\Common\DoctrineException::updateMe(); if ($this->_subselect) {
throw \Doctrine\Common\DoctrineException::updateMe();
}
$this->_simpleArithmeticExpression = $simpleArithmeticExpr; $this->_simpleArithmeticExpression = $simpleArithmeticExpr;
} }
public function setSubselect($subselect) public function setSubselect($subselect)
{ {
if ($this->_simpleArithmeticExpression) throw \Doctrine\Common\DoctrineException::updateMe(); if ($this->_simpleArithmeticExpression){
throw \Doctrine\Common\DoctrineException::updateMe();
}
$this->_subselect = $subselect; $this->_subselect = $subselect;
} }
...@@ -40,12 +44,11 @@ class ArithmeticExpression extends Node ...@@ -40,12 +44,11 @@ class ArithmeticExpression extends Node
public function isSimpleArithmeticExpression() public function isSimpleArithmeticExpression()
{ {
return (bool)$this->_simpleArithmeticExpression; return (bool) $this->_simpleArithmeticExpression;
} }
public function isSubselect() public function isSubselect()
{ {
return (bool)$this->_subselect; return (bool) $this->_subselect;
} }
} }
\ No newline at end of file
...@@ -39,4 +39,3 @@ class ArithmeticFactor extends Node ...@@ -39,4 +39,3 @@ class ArithmeticFactor extends Node
return $this->_nSigned; return $this->_nSigned;
} }
} }
...@@ -25,4 +25,3 @@ class ArithmeticTerm extends Node ...@@ -25,4 +25,3 @@ class ArithmeticTerm extends Node
return $this->_factors; return $this->_factors;
} }
} }
...@@ -44,4 +44,3 @@ class ComparisonExpression extends Node ...@@ -44,4 +44,3 @@ class ComparisonExpression extends Node
return $this->_operator; return $this->_operator;
} }
} }
...@@ -35,5 +35,4 @@ namespace Doctrine\ORM\Query\AST; ...@@ -35,5 +35,4 @@ namespace Doctrine\ORM\Query\AST;
*/ */
class ComparisonOperator extends Node class ComparisonOperator extends Node
{ {
} }
\ No newline at end of file
...@@ -25,4 +25,3 @@ class ConditionalExpression extends Node ...@@ -25,4 +25,3 @@ class ConditionalExpression extends Node
return $this->_conditionalTerms; return $this->_conditionalTerms;
} }
} }
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment