diff --git a/lib/Doctrine/Common/Configurable.php b/lib/Doctrine/Common/Configurable.php deleted file mode 100644 index 1725d095b..000000000 --- a/lib/Doctrine/Common/Configurable.php +++ /dev/null @@ -1,39 +0,0 @@ -. - */ - -#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 - * @author Roman Borschel - */ -interface Doctrine_Common_Configurable -{ - public function getAttribute($name); - public function setAttribute($name, $value); - public function hasAttribute($name); -} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Connection.php b/lib/Doctrine/DBAL/Connection.php index b8b6f2bbd..14fc3c046 100644 --- a/lib/Doctrine/DBAL/Connection.php +++ b/lib/Doctrine/DBAL/Connection.php @@ -284,7 +284,7 @@ class Connection /** * 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 array $values An associateve array containing column-value pairs. * @return mixed boolean false if empty value array was given, @@ -509,7 +509,7 @@ class Connection * @param string $query sql query * @param array $params query parameters * - * @return PDOStatement|Doctrine_Adapter_Statement + * @return PDOStatement */ public function execute($query, array $params = array()) { @@ -536,7 +536,7 @@ class Connection * @param string $query sql query * @param array $params query parameters * - * @return PDOStatement|Doctrine_Adapter_Statement + * @return PDOStatement * @todo Rename to executeUpdate(). */ public function exec($query, array $params = array()) { @@ -562,7 +562,7 @@ class Connection /** * 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) { @@ -711,7 +711,7 @@ class Connection * eventlistener methods * * @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. */ public function rollback() @@ -772,4 +772,4 @@ class Connection } return $this->_schemaManager; } -} +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Driver.php b/lib/Doctrine/DBAL/Driver.php index 66e757c7e..9ba474182 100644 --- a/lib/Doctrine/DBAL/Driver.php +++ b/lib/Doctrine/DBAL/Driver.php @@ -20,7 +20,7 @@ interface Driver * @return Doctrine::DBAL::Connection The database connection. */ public function connect(array $params, $username = null, $password = null, array $driverOptions = array()); - + /** * Gets the DatabasePlatform instance that provides all the metadata about * the platform this driver connects to. @@ -28,7 +28,7 @@ interface Driver * @return Doctrine::DBAL::DatabasePlatform The database platform. */ public function getDatabasePlatform(); - + /** * Gets the SchemaManager that can be used to inspect and change the underlying * database schema of the platform this driver connects to. @@ -36,5 +36,4 @@ interface Driver * @return Doctrine\DBAL\SchemaManager */ public function getSchemaManager(Connection $conn); -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Driver/PDOConnection.php b/lib/Doctrine/DBAL/Driver/PDOConnection.php index 4a71429bf..cf9cd41ad 100644 --- a/lib/Doctrine/DBAL/Driver/PDOConnection.php +++ b/lib/Doctrine/DBAL/Driver/PDOConnection.php @@ -19,4 +19,4 @@ class PDOConnection extends PDO implements \Doctrine\DBAL\Driver\Connection $this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION); $this->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER); } -} +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Driver/PDOMsSql/Connection.php b/lib/Doctrine/DBAL/Driver/PDOMsSql/Connection.php index 90c2b79b3..c65126d6a 100644 --- a/lib/Doctrine/DBAL/Driver/PDOMsSql/Connection.php +++ b/lib/Doctrine/DBAL/Driver/PDOMsSql/Connection.php @@ -7,7 +7,7 @@ namespace Doctrine\DBAL\Driver\PDOMsSql; * * @since 2.0 */ -class Connection extends PDO implements \Doctrine\DBAL\Driver\Connection +class Connection extends PDO implements \Doctrine\DBAL\Driver\PDOConnection { /** * Performs the rollback. @@ -18,7 +18,7 @@ class Connection extends PDO implements \Doctrine\DBAL\Driver\Connection { $this->exec('ROLLBACK TRANSACTION'); } - + /** * Performs the commit. * @@ -28,7 +28,7 @@ class Connection extends PDO implements \Doctrine\DBAL\Driver\Connection { $this->exec('COMMIT TRANSACTION'); } - + /** * Begins a database transaction. * @@ -38,5 +38,4 @@ class Connection extends PDO implements \Doctrine\DBAL\Driver\Connection { $this->exec('BEGIN TRANSACTION'); } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Driver/PDOMsSql/Driver.php b/lib/Doctrine/DBAL/Driver/PDOMsSql/Driver.php index 8ce0294f5..96410c668 100644 --- a/lib/Doctrine/DBAL/Driver/PDOMsSql/Driver.php +++ b/lib/Doctrine/DBAL/Driver/PDOMsSql/Driver.php @@ -4,16 +4,16 @@ namespace Doctrine\DBAL\Driver\PDOMsSql; class Driver implements \Doctrine\DBAL\Driver { - public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) { return new Connection( - $this->_constructPdoDsn($params), - $username, - $password, - $driverOptions); + $this->_constructPdoDsn($params), + $username, + $password, + $driverOptions + ); } - + /** * Constructs the MySql PDO DSN. * @@ -25,16 +25,14 @@ class Driver implements \Doctrine\DBAL\Driver { //TODO } - + public function getDatabasePlatform() { - return new Doctrine_DatabasePlatform_MySqlPlatform(); + return new \Doctrine\DBAL\Platforms\MsSqlPlatform(); } - - public function getSchemaManager(Doctrine_Connection $conn) - { - return new Doctrine_Schema_MySqlSchemaManager($conn); - } - -} + public function getSchemaManager(\Doctrine\DBAL\Connection $conn) + { + return new \Doctrine\DBAL\Schema\MsSqlSchemaManager($conn); + } +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php b/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php index e49024a0a..a89061ff5 100644 --- a/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php +++ b/lib/Doctrine/DBAL/Driver/PDOMySql/Driver.php @@ -40,14 +40,15 @@ class Driver implements \Doctrine\DBAL\Driver public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) { $conn = new \Doctrine\DBAL\Driver\PDOConnection( - $this->_constructPdoDsn($params), - $username, - $password, - $driverOptions); + $this->_constructPdoDsn($params), + $username, + $password, + $driverOptions + ); $conn->setAttribute(\PDO::ATTR_AUTOCOMMIT, false); return $conn; } - + /** * Constructs the MySql PDO DSN. * @@ -73,16 +74,14 @@ class Driver implements \Doctrine\DBAL\Driver return $dsn; } - + public function getDatabasePlatform() { return new \Doctrine\DBAL\Platforms\MySqlPlatform(); } - + public function getSchemaManager(\Doctrine\DBAL\Connection $conn) { return new \Doctrine\DBAL\Schema\MySqlSchemaManager($conn); } - -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php b/lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php index 5b0b68a38..165f0293f 100644 --- a/lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php +++ b/lib/Doctrine/DBAL/Driver/PDOOracle/Driver.php @@ -2,18 +2,20 @@ namespace Doctrine\DBAL\Driver\PDOOracle; +use Doctrine\DBAL\Platforms; + class Driver implements \Doctrine\DBAL\Driver { - public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) { return new \Doctrine\DBAL\Driver\PDOConnection( - $this->_constructPdoDsn($params), - $username, - $password, - $driverOptions); + $this->_constructPdoDsn($params), + $username, + $password, + $driverOptions + ); } - + /** * Constructs the Oracle PDO DSN. * @@ -23,16 +25,14 @@ class Driver implements \Doctrine\DBAL\Driver { //TODO } - + public function getDatabasePlatform() { return new \Doctrine\DBAL\Platforms\OraclePlatform(); } - + public function getSchemaManager(\Doctrine\DBAL\Connection $conn) { return new \Doctrine\DBAL\Schema\OracleSchemaManager($conn); } - -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php b/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php index ac475b415..e383e2067 100644 --- a/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php +++ b/lib/Doctrine/DBAL/Driver/PDOPgSql/Driver.php @@ -1,24 +1,26 @@ _constructPdoDsn($params), - $username, - $password, - $driverOptions); + return new \Doctrine\DBAL\Driver\PDOConnection( + $this->_constructPdoDsn($params), + $username, + $password, + $driverOptions + ); } - + /** * Constructs the Postgres PDO DSN. * @@ -28,17 +30,14 @@ class Doctrine_DBAL_Driver_PDOPgSql_Driver implements Doctrine_DBAL_Driver { //TODO } - + public function getDatabasePlatform() { - return new Doctrine_DBAL_Platforms_PostgreSqlPlatform(); + return new \Doctrine\DBAL\Platforms\PostgreSqlPlatform(); } - - public function getSchemaManager(Doctrine_DBAL_Connection $conn) - { - return new Doctrine_DBAL_Schema_PostgreSqlSchemaManager($conn); - } - -} -?> \ No newline at end of file + public function getSchemaManager(\Doctrine\DBAL\Connection $conn) + { + return new \Doctrine\DBAL\Schema\PostgreSqlSchemaManager($conn); + } +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php b/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php index 9afaf0205..b6eceb831 100644 --- a/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php +++ b/lib/Doctrine/DBAL/Driver/PDOSqlite/Driver.php @@ -2,8 +2,6 @@ namespace Doctrine\DBAL\Driver\PDOSqlite; -#use Doctrine::DBAL::Driver; - /** * The PDO Sqlite driver. * @@ -23,12 +21,13 @@ class Driver implements \Doctrine\DBAL\Driver public function connect(array $params, $username = null, $password = null, array $driverOptions = array()) { return new \Doctrine\DBAL\Driver\PDOConnection( - $this->_constructPdoDsn($params), - $username, - $password, - $driverOptions); + $this->_constructPdoDsn($params), + $username, + $password, + $driverOptions + ); } - + /** * Constructs the Sqlite PDO DSN. * @@ -46,7 +45,7 @@ class Driver implements \Doctrine\DBAL\Driver return $dsn; } - + /** * Gets the database platform that is relevant for this driver. */ @@ -54,7 +53,7 @@ class Driver implements \Doctrine\DBAL\Driver { return new \Doctrine\DBAL\Platforms\SqlitePlatform(); } - + /** * Gets the schema manager that is relevant for this driver. * @@ -65,7 +64,4 @@ class Driver implements \Doctrine\DBAL\Driver { return new \Doctrine\DBAL\Schema\SqliteSchemaManager($conn); } - -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Driver/PDOStatement.php b/lib/Doctrine/DBAL/Driver/PDOStatement.php index f628a1ec1..f91a211c7 100644 --- a/lib/Doctrine/DBAL/Driver/PDOStatement.php +++ b/lib/Doctrine/DBAL/Driver/PDOStatement.php @@ -5,4 +5,4 @@ namespace Doctrine\DBAL\Driver; class PDOStatement extends \PDOStatement implements \Doctrine\DBAL\Driver\Statement { private function __construct() {} -} +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Driver/Statement.php b/lib/Doctrine/DBAL/Driver/Statement.php index a7ba010d3..f65117efd 100644 --- a/lib/Doctrine/DBAL/Driver/Statement.php +++ b/lib/Doctrine/DBAL/Driver/Statement.php @@ -67,9 +67,9 @@ interface Statement /** * bindParam * 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 - * that Doctrine_Adapter_Statement_Interface->execute() is called. + * that PDOStatement->execute() is called. * * 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 @@ -106,7 +106,7 @@ interface Statement * Returns the number of columns in the result set * * @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. */ public function columnCount(); @@ -157,18 +157,18 @@ interface Statement * this value determines which row will be returned to the caller. * This value must be one of the Query::HYDRATE_ORI_* constants, defaulting to * 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 * 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 * 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 * specifies the row to fetch relative to the cursor position before - * Doctrine_Adapter_Statement_Interface->fetch() was called. + * PDOStatement->fetch() was called. * * @return mixed */ @@ -197,7 +197,7 @@ interface Statement * 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 - * value is supplied, Doctrine_Adapter_Statement_Interface->fetchColumn() + * value is supplied, PDOStatement->fetchColumn() * fetches the first column. * * @return string returns a single column in the next row of a result set. @@ -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. 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 array $args Elements of this array are passed to the constructor. @@ -292,4 +292,4 @@ interface Statement * @return boolean Returns 1 on success or FALSE on failure. */ public function setFetchMode($mode, $arg1); -} +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/DriverManager.php b/lib/Doctrine/DBAL/DriverManager.php index ad7d988f4..393feda49 100644 --- a/lib/Doctrine/DBAL/DriverManager.php +++ b/lib/Doctrine/DBAL/DriverManager.php @@ -48,7 +48,7 @@ final class DriverManager /** Private constructor. This class cannot be instantiated. */ private function __construct() {} - + /** * Creates a connection object based on the specified parameters. * This method returns a Doctrine\DBAL\Connection which wraps the underlying @@ -128,7 +128,7 @@ final class DriverManager return new $wrapperClass($params, $driver, $config, $eventManager); } - + /** * Checks the list of parameters. * @@ -150,5 +150,4 @@ final class DriverManager throw Exceptions\DBALException::unknownDriver($params['driver']); } } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php index 785bc0c37..68ea213b1 100644 --- a/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php @@ -1953,6 +1953,4 @@ abstract class AbstractPlatform * @params array $field */ abstract public function getVarcharDeclarationSql(array $field); -} - - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Platforms/Db2Platform.php b/lib/Doctrine/DBAL/Platforms/Db2Platform.php index 5d11caff8..f08870338 100644 --- a/lib/Doctrine/DBAL/Platforms/Db2Platform.php +++ b/lib/Doctrine/DBAL/Platforms/Db2Platform.php @@ -4,11 +4,8 @@ namespace Doctrine\DBAL\Platforms; class Db2Platform extends AbstractPlatform { - public function getSequenceNextValSql($sequenceName) { return 'SELECT NEXTVAL FOR ' . $this->quoteIdentifier($sequenceName) . ' FROM SYSIBM.SYSDUMMY1'; } - -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Platforms/FirebirdPlatform.php b/lib/Doctrine/DBAL/Platforms/FirebirdPlatform.php index 71326d0fa..72ab193d3 100644 --- a/lib/Doctrine/DBAL/Platforms/FirebirdPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/FirebirdPlatform.php @@ -9,7 +9,6 @@ namespace Doctrine\DBAL\Platforms; */ class FirebirdPlatform extends AbstractPlatform { - /** * Constructor. */ @@ -289,7 +288,4 @@ class FirebirdPlatform extends AbstractPlatform { return 'SET TRANSACTION ISOLATION LEVEL ' . $this->_getTransactionIsolationLevelSql($level); } - -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Platforms/InformixPlatform.php b/lib/Doctrine/DBAL/Platforms/InformixPlatform.php index 6aed01eb2..4a3c99c27 100644 --- a/lib/Doctrine/DBAL/Platforms/InformixPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/InformixPlatform.php @@ -9,7 +9,6 @@ namespace Doctrine\DBAL\Platforms; */ class InformixPlatform extends AbstractPlatform { - public function __construct() { parent::__construct(); @@ -92,7 +91,4 @@ class InformixPlatform extends AbstractPlatform } throw \Doctrine\Common\DoctrineException::updateMe('Unknown field type \'' . $field['type'] . '\'.'); } - -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Platforms/MockPlatform.php b/lib/Doctrine/DBAL/Platforms/MockPlatform.php index 76b9c5706..a0252d7de 100644 --- a/lib/Doctrine/DBAL/Platforms/MockPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/MockPlatform.php @@ -5,5 +5,4 @@ class MockPlatform extends AbstractPlatform { public function getNativeDeclaration(array $field) {} public function getPortableDeclaration(array $field) {} -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php b/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php index acb97bdc5..bec56df70 100644 --- a/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/MsSqlPlatform.php @@ -322,6 +322,4 @@ class MsSqlPlatform extends AbstractPlatform return 'SET TRANSACTION ISOLATION LEVEL ' . $this->_getTransactionIsolationLevelSql($level); } -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php b/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php index 74bbef1d9..9b8545c33 100644 --- a/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/MySqlPlatform.php @@ -1259,6 +1259,4 @@ class MySqlPlatform extends AbstractPlatform { return 'SET SESSION TRANSACTION ISOLATION LEVEL ' . $this->_getTransactionIsolationLevelSql($level); } -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php index 6837ae140..483e36a6e 100644 --- a/lib/Doctrine/DBAL/Platforms/OraclePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/OraclePlatform.php @@ -375,6 +375,4 @@ class OraclePlatform extends AbstractPlatform return parent::_getTransactionIsolationLevelSql($level); } } -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php index 3fcac3cc7..b1fbb3512 100644 --- a/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php +++ b/lib/Doctrine/DBAL/Platforms/PostgreSqlPlatform.php @@ -833,7 +833,7 @@ class PostgreSqlPlatform extends AbstractPlatform /** * 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 $start start value of the sequence; default is 1 * @param array $options An associative array of table options: @@ -1001,6 +1001,4 @@ class PostgreSqlPlatform extends AbstractPlatform return 'SET SESSION CHARACTERISTICS AS TRANSACTION ISOLATION LEVEL ' . $this->_getTransactionIsolationLevelSql($level); } -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php b/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php index 43131e44c..8a3a0cc74 100644 --- a/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php +++ b/lib/Doctrine/DBAL/Platforms/SqlitePlatform.php @@ -29,7 +29,6 @@ namespace Doctrine\DBAL\Platforms; */ class SqlitePlatform extends AbstractPlatform { - /** * the constructor */ @@ -564,5 +563,4 @@ class SqlitePlatform extends AbstractPlatform { return false; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php b/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php index d27b19c7a..760c7dd40 100644 --- a/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php @@ -228,7 +228,7 @@ abstract class AbstractSchemaManager * drop existing sequence * (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 * @return void */ @@ -285,7 +285,7 @@ abstract class AbstractSchemaManager /** * 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 $start start value of the sequence; default is 1 * @param array $options An associative array of table options: @@ -476,6 +476,4 @@ abstract class AbstractSchemaManager $this->_conn->execute($sql); } } -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Schema/FirebirdSchemaManager.php b/lib/Doctrine/DBAL/Schema/FirebirdSchemaManager.php index db721c27e..9b8726edd 100644 --- a/lib/Doctrine/DBAL/Schema/FirebirdSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/FirebirdSchemaManager.php @@ -614,10 +614,10 @@ class FirebirdSchemaManager extends AbstractSchemaManager $this->_conn->exec('SET GENERATOR ' . $sequenceName . ' TO ' . ($start-1)); return true; - } catch (Doctrine_Connection_Exception $e) { + } catch (Doctrine\DBAL\ConnectionException $e) { try { $this->dropSequence($seqName); - } catch(Doctrine_Connection_Exception $e) { + } catch(Doctrine\DBAL\ConnectionException $e) { throw \Doctrine\Common\DoctrineException::updateMe('Could not drop inconsistent sequence table'); } } @@ -638,7 +638,4 @@ class FirebirdSchemaManager extends AbstractSchemaManager return $query; } - -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Schema/InformixSchemaManager.php b/lib/Doctrine/DBAL/Schema/InformixSchemaManager.php index df1179548..d7e158d4f 100644 --- a/lib/Doctrine/DBAL/Schema/InformixSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/InformixSchemaManager.php @@ -34,28 +34,23 @@ namespace Doctrine\DBAL\Schema; class InformixSchemaManager extends AbstractSchemaManager { protected $sql = array( - 'listTables' => "SELECT tabname,tabtype FROM systables WHERE tabtype IN ('T','V') AND owner != 'informix'", - 'listColumns' => "SELECT c.colname, c.coltype, c.collength, d.default, c.colno - FROM syscolumns c, systables t,outer sysdefaults d - WHERE c.tabid = t.tabid AND d.tabid = t.tabid AND d.colno = c.colno - AND tabname='%s' ORDER BY c.colno", - 'listPk' => "SELECT part1, part2, part3, part4, part5, part6, part7, part8 FROM - systables t, sysconstraints s, sysindexes i WHERE t.tabname='%s' - AND s.tabid=t.tabid AND s.constrtype='P' - AND i.idxname=s.idxname", - 'listForeignKeys' => "SELECT tr.tabname,updrule,delrule, - i.part1 o1,i2.part1 d1,i.part2 o2,i2.part2 d2,i.part3 o3,i2.part3 d3,i.part4 o4,i2.part4 d4, - i.part5 o5,i2.part5 d5,i.part6 o6,i2.part6 d6,i.part7 o7,i2.part7 d7,i.part8 o8,i2.part8 d8 - from systables t,sysconstraints s,sysindexes i, - sysreferences r,systables tr,sysconstraints s2,sysindexes i2 - where t.tabname='%s' - and s.tabid=t.tabid and s.constrtype='R' and r.constrid=s.constrid - and i.idxname=s.idxname and tr.tabid=r.ptabid - and s2.constrid=r.primary and i2.idxname=s2.idxname", - ); - - - - -} - + 'listTables' => "SELECT tabname,tabtype FROM systables WHERE tabtype IN ('T','V') AND owner != 'informix'", + 'listColumns' => "SELECT c.colname, c.coltype, c.collength, d.default, c.colno + FROM syscolumns c, systables t,outer sysdefaults d + WHERE c.tabid = t.tabid AND d.tabid = t.tabid AND d.colno = c.colno + AND tabname='%s' ORDER BY c.colno", + 'listPk' => "SELECT part1, part2, part3, part4, part5, part6, part7, part8 FROM + systables t, sysconstraints s, sysindexes i WHERE t.tabname='%s' + AND s.tabid=t.tabid AND s.constrtype='P' + AND i.idxname=s.idxname", + 'listForeignKeys' => "SELECT tr.tabname,updrule,delrule, + i.part1 o1,i2.part1 d1,i.part2 o2,i2.part2 d2,i.part3 o3,i2.part3 d3,i.part4 o4,i2.part4 d4, + i.part5 o5,i2.part5 d5,i.part6 o6,i2.part6 d6,i.part7 o7,i2.part7 d7,i.part8 o8,i2.part8 d8 + from systables t,sysconstraints s,sysindexes i, + sysreferences r,systables tr,sysconstraints s2,sysindexes i2 + where t.tabname='%s' + and s.tabid=t.tabid and s.constrtype='R' and r.constrid=s.constrid + and i.idxname=s.idxname and tr.tabid=r.ptabid + and s2.constrid=r.primary and i2.idxname=s2.idxname", + ); +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Schema/MsSqlSchemaManager.php b/lib/Doctrine/DBAL/Schema/MsSqlSchemaManager.php index 48ec295e8..de79eed64 100644 --- a/lib/Doctrine/DBAL/Schema/MsSqlSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/MsSqlSchemaManager.php @@ -417,7 +417,4 @@ class MsSqlSchemaManager extends AbstractSchemaManager return $this->conn->fetchColumn($query); } - -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php b/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php index 49028b5a2..71c2554c6 100644 --- a/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/MySqlSchemaManager.php @@ -279,7 +279,7 @@ class MySqlSchemaManager extends AbstractSchemaManager } $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'); } @@ -295,7 +295,7 @@ class MySqlSchemaManager extends AbstractSchemaManager // Handle error try { $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'); } @@ -316,7 +316,4 @@ class MySqlSchemaManager extends AbstractSchemaManager $name = $this->_conn->quoteIdentifier($name); return $this->_conn->exec('ALTER TABLE ' . $table . ' DROP FOREIGN KEY ' . $name); } - -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php b/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php index c9f9f1567..5724c6c9a 100644 --- a/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/OracleSchemaManager.php @@ -704,7 +704,4 @@ END; $query = 'SELECT view_name FROM sys.user_views'; return $this->_conn->fetchColumn($query); } - -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php b/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php index cb5c5fcc7..6e734bf05 100644 --- a/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/PostgreSqlSchemaManager.php @@ -118,7 +118,7 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager * @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 * actually perform them otherwise. - * @throws Doctrine_Connection_Exception + * @throws Doctrine\DBAL\ConnectionException * @return boolean */ public function alterTable($name, array $changes, $check = false) @@ -260,6 +260,4 @@ class PostgreSqlSchemaManager extends AbstractSchemaManager { return $this->_conn->fetchColumn($query); } -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php b/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php index be50efda1..f0e952d61 100644 --- a/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php +++ b/lib/Doctrine/DBAL/Schema/SqliteSchemaManager.php @@ -428,12 +428,12 @@ class SqliteSchemaManager extends AbstractSchemaManager try { $this->_conn->exec('INSERT INTO ' . $sequenceName . ' (' . $seqcolName . ') VALUES (' . ($start-1) . ')'); return true; - } catch(Doctrine_Connection_Exception $e) { + } catch(Doctrine\DBAL\ConnectionException $e) { // Handle error try { $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'); } } @@ -587,5 +587,4 @@ class SqliteSchemaManager extends AbstractSchemaManager $name = $this->_conn->quoteIdentifier($name, true); return $name . ' ' . $type . $unsigned . $default . $notnull . $autoinc; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Statement.php b/lib/Doctrine/DBAL/Statement.php index c4541e0cb..fb481aa6b 100644 --- a/lib/Doctrine/DBAL/Statement.php +++ b/lib/Doctrine/DBAL/Statement.php @@ -125,9 +125,9 @@ class Statement /** * 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 - * that Doctrine_Adapter_Statement_Interface->execute() is called. + * that PDOStatement->execute() is called. * * 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 @@ -172,7 +172,7 @@ class Statement * Returns the number of columns in the result set * * @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. */ public function columnCount() @@ -250,18 +250,18 @@ class Statement * this value determines which row will be returned to the caller. * This value must be one of the Query::HYDRATE_ORI_* constants, defaulting to * 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 * 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 * 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 * specifies the row to fetch relative to the cursor position before - * Doctrine_Adapter_Statement_Interface->fetch() was called. + * PDOStatement->fetch() was called. * * @return mixed */ @@ -323,7 +323,7 @@ class Statement * 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 - * value is supplied, Doctrine_Adapter_Statement_Interface->fetchColumn() + * value is supplied, PDOStatement->fetchColumn() * fetches the first column. * * @return string returns a single column in the next row of a result set. @@ -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. 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 array $args Elements of this array are passed to the constructor. @@ -435,4 +435,4 @@ class Statement { return $this->_stmt->setFetchMode($mode, $arg1, $arg2); } -} +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Types/ArrayType.php b/lib/Doctrine/DBAL/Types/ArrayType.php index 44c95b023..55e071651 100644 --- a/lib/Doctrine/DBAL/Types/ArrayType.php +++ b/lib/Doctrine/DBAL/Types/ArrayType.php @@ -9,11 +9,8 @@ namespace Doctrine\DBAL\Types; */ class ArrayType extends Type { - - public function getName() { return 'Array'; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Types/BigIntType.php b/lib/Doctrine/DBAL/Types/BigIntType.php index 92a96e452..8b6455668 100644 --- a/lib/Doctrine/DBAL/Types/BigIntType.php +++ b/lib/Doctrine/DBAL/Types/BigIntType.php @@ -10,5 +10,4 @@ namespace Doctrine\DBAL\Types; class BigIntType extends Type { //put your code here -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Types/BooleanType.php b/lib/Doctrine/DBAL/Types/BooleanType.php index 0ad3eabe3..1d2de720d 100644 --- a/lib/Doctrine/DBAL/Types/BooleanType.php +++ b/lib/Doctrine/DBAL/Types/BooleanType.php @@ -30,5 +30,4 @@ class BooleanType extends Type { return (bool)$value; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Types/CharType.php b/lib/Doctrine/DBAL/Types/CharType.php index d7feb25b8..133e10116 100644 --- a/lib/Doctrine/DBAL/Types/CharType.php +++ b/lib/Doctrine/DBAL/Types/CharType.php @@ -10,5 +10,4 @@ namespace Doctrine\DBAL\Types; class CharType { //put your code here -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Types/DateTimeType.php b/lib/Doctrine/DBAL/Types/DateTimeType.php index 8f816aa28..269938489 100644 --- a/lib/Doctrine/DBAL/Types/DateTimeType.php +++ b/lib/Doctrine/DBAL/Types/DateTimeType.php @@ -32,6 +32,4 @@ class DateTimeType extends Type { return new DateTime($value); } -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Types/DecimalType.php b/lib/Doctrine/DBAL/Types/DecimalType.php index 11e2112af..68f4f6ccc 100644 --- a/lib/Doctrine/DBAL/Types/DecimalType.php +++ b/lib/Doctrine/DBAL/Types/DecimalType.php @@ -9,5 +9,4 @@ namespace Doctrine\DBAL\Types; class DecimalType extends Type { -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Types/IntegerType.php b/lib/Doctrine/DBAL/Types/IntegerType.php index 8b9a01061..608bb31f3 100644 --- a/lib/Doctrine/DBAL/Types/IntegerType.php +++ b/lib/Doctrine/DBAL/Types/IntegerType.php @@ -8,7 +8,6 @@ namespace Doctrine\DBAL\Types; */ class IntegerType extends Type { - public function getName() { return "Integer"; diff --git a/lib/Doctrine/DBAL/Types/MediumIntType.php b/lib/Doctrine/DBAL/Types/MediumIntType.php index 119d71b4e..c57897d47 100644 --- a/lib/Doctrine/DBAL/Types/MediumIntType.php +++ b/lib/Doctrine/DBAL/Types/MediumIntType.php @@ -10,5 +10,4 @@ namespace Doctrine\DBAL\Types; class MediumIntType { //put your code here -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Types/SmallIntType.php b/lib/Doctrine/DBAL/Types/SmallIntType.php index 3c438d909..5ab13408a 100644 --- a/lib/Doctrine/DBAL/Types/SmallIntType.php +++ b/lib/Doctrine/DBAL/Types/SmallIntType.php @@ -10,5 +10,4 @@ namespace Doctrine\DBAL\Types; class SmallIntType { //put your code here -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Types/TextType.php b/lib/Doctrine/DBAL/Types/TextType.php index c31d0d45a..c2fc4870f 100644 --- a/lib/Doctrine/DBAL/Types/TextType.php +++ b/lib/Doctrine/DBAL/Types/TextType.php @@ -14,6 +14,4 @@ class TextType extends Type { return $platform->getClobDeclarationSql($fieldDeclaration); } - -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Types/TinyIntType.php b/lib/Doctrine/DBAL/Types/TinyIntType.php index cc50e5595..37f373fdf 100644 --- a/lib/Doctrine/DBAL/Types/TinyIntType.php +++ b/lib/Doctrine/DBAL/Types/TinyIntType.php @@ -10,5 +10,4 @@ namespace Doctrine\DBAL\Types; class TinyIntType { //put your code here -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Types/Type.php b/lib/Doctrine/DBAL/Types/Type.php index b007d45fe..d97df5ca8 100644 --- a/lib/Doctrine/DBAL/Types/Type.php +++ b/lib/Doctrine/DBAL/Types/Type.php @@ -2,7 +2,7 @@ namespace Doctrine\DBAL\Types; -#use Doctrine\DBAL\Platforms\AbstractDatabasePlatform; +use Doctrine\DBAL\Platforms\AbstractPlatform; abstract class Type { @@ -90,5 +90,4 @@ abstract class Type } self::$_typesMap[$name] = $className; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/DBAL/Types/VarcharType.php b/lib/Doctrine/DBAL/Types/VarcharType.php index 2af868c67..0e4c11b24 100644 --- a/lib/Doctrine/DBAL/Types/VarcharType.php +++ b/lib/Doctrine/DBAL/Types/VarcharType.php @@ -22,6 +22,8 @@ class VarcharType extends Type } /** @override */ - public function getName() { return 'Varchar'; } -} - + public function getName() + { + return 'Varchar'; + } +} \ No newline at end of file diff --git a/lib/Doctrine/Exception.php b/lib/Doctrine/Exception.php deleted file mode 100644 index a5b356586..000000000 --- a/lib/Doctrine/Exception.php +++ /dev/null @@ -1,57 +0,0 @@ -. - */ - -#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 - * @author Roman Borschel - * @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'."); - } - -} diff --git a/lib/Doctrine/ORM/Cache/ApcCache.php b/lib/Doctrine/ORM/Cache/ApcCache.php index 9104ea4f8..a9c602b81 100644 --- a/lib/Doctrine/ORM/Cache/ApcCache.php +++ b/lib/Doctrine/ORM/Cache/ApcCache.php @@ -74,4 +74,4 @@ class ApcCache implements Cache { return apc_delete($id); } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Cache/ArrayCache.php b/lib/Doctrine/ORM/Cache/ArrayCache.php index 54c80ed14..58b90b9ad 100644 --- a/lib/Doctrine/ORM/Cache/ArrayCache.php +++ b/lib/Doctrine/ORM/Cache/ArrayCache.php @@ -89,4 +89,4 @@ class ArrayCache implements Cache { return count($this->data); } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Cache/Cache.php b/lib/Doctrine/ORM/Cache/Cache.php index f23565447..e2176b44c 100644 --- a/lib/Doctrine/ORM/Cache/Cache.php +++ b/lib/Doctrine/ORM/Cache/Cache.php @@ -68,4 +68,4 @@ interface Cache * @return boolean true if no problem */ public function delete($id); -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Cache/DbCache.php b/lib/Doctrine/ORM/Cache/DbCache.php index 1270fbbfb..7ca7eda09 100644 --- a/lib/Doctrine/ORM/Cache/DbCache.php +++ b/lib/Doctrine/ORM/Cache/DbCache.php @@ -178,4 +178,4 @@ class DbCache implements Cache, \Countable $this->getConnection()->export->createTable($name, $fields, $options); } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Cache/MemcacheCache.php b/lib/Doctrine/ORM/Cache/MemcacheCache.php index 9857de710..f11207479 100644 --- a/lib/Doctrine/ORM/Cache/MemcacheCache.php +++ b/lib/Doctrine/ORM/Cache/MemcacheCache.php @@ -98,4 +98,4 @@ class MemcacheCache implements Cache { return $this->_memcache->delete($id); } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Events.php b/lib/Doctrine/ORM/Events.php index 4b21c188b..e424a4583 100644 --- a/lib/Doctrine/ORM/Events.php +++ b/lib/Doctrine/ORM/Events.php @@ -37,6 +37,4 @@ final class Events const postDelete = 'postDelete'; const preSave = 'preSave'; const postSave = 'postSave'; - -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Id/AbstractIdGenerator.php b/lib/Doctrine/ORM/Id/AbstractIdGenerator.php index 4bbaa7c90..3541ae689 100644 --- a/lib/Doctrine/ORM/Id/AbstractIdGenerator.php +++ b/lib/Doctrine/ORM/Id/AbstractIdGenerator.php @@ -31,8 +31,8 @@ abstract class AbstractIdGenerator * * @return boolean */ - public function isPostInsertGenerator() { + public function isPostInsertGenerator() + { return false; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Id/Assigned.php b/lib/Doctrine/ORM/Id/Assigned.php index d8b0c3d54..ca2c49568 100644 --- a/lib/Doctrine/ORM/Id/Assigned.php +++ b/lib/Doctrine/ORM/Id/Assigned.php @@ -66,5 +66,4 @@ class Assigned extends AbstractIdGenerator return $identifier; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Id/IdentityGenerator.php b/lib/Doctrine/ORM/Id/IdentityGenerator.php index f3c9558ad..f6913343f 100644 --- a/lib/Doctrine/ORM/Id/IdentityGenerator.php +++ b/lib/Doctrine/ORM/Id/IdentityGenerator.php @@ -20,8 +20,8 @@ class IdentityGenerator extends AbstractIdGenerator * @return boolean * @override */ - public function isPostInsertGenerator() { + public function isPostInsertGenerator() + { return true; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Id/SequenceGenerator.php b/lib/Doctrine/ORM/Id/SequenceGenerator.php index 381648fb1..b600d8aae 100644 --- a/lib/Doctrine/ORM/Id/SequenceGenerator.php +++ b/lib/Doctrine/ORM/Id/SequenceGenerator.php @@ -23,5 +23,4 @@ class SequenceGenerator extends AbstractIdGenerator $sql = $conn->getDatabasePlatform()->getSequenceNextValSql($this->_sequenceName); return $conn->fetchOne($sql); } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Id/SequenceIdentityGenerator.php b/lib/Doctrine/ORM/Id/SequenceIdentityGenerator.php index 22e20594e..b3c187e4c 100644 --- a/lib/Doctrine/ORM/Id/SequenceIdentityGenerator.php +++ b/lib/Doctrine/ORM/Id/SequenceIdentityGenerator.php @@ -21,6 +21,4 @@ class SequenceIdentityGenerator extends IdentityGenerator { return $this->_em->getConnection()->lastInsertId($this->_sequenceName); } - -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Id/TableGenerator.php b/lib/Doctrine/ORM/Id/TableGenerator.php index 6b98b63a3..9221eb75b 100644 --- a/lib/Doctrine/ORM/Id/TableGenerator.php +++ b/lib/Doctrine/ORM/Id/TableGenerator.php @@ -9,11 +9,8 @@ namespace Doctrine\ORM\Id; */ class TableGenerator extends AbstractIdGenerator { - public function generate($entity) { throw \Doctrine\Common\DoctrineException::updateMe("Not implemented"); } - -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Import/Exception.php b/lib/Doctrine/ORM/Import/Exception.php deleted file mode 100644 index 0800208e3..000000000 --- a/lib/Doctrine/ORM/Import/Exception.php +++ /dev/null @@ -1,34 +0,0 @@ -. - */ - -/** - * 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 - */ -class Doctrine_Import_Exception extends Doctrine_Exception -{ } \ No newline at end of file diff --git a/lib/Doctrine/ORM/Import/Reader.php b/lib/Doctrine/ORM/Import/Reader/AbstractReader.php similarity index 82% rename from lib/Doctrine/ORM/Import/Reader.php rename to lib/Doctrine/ORM/Import/Reader/AbstractReader.php index cb0b602b4..6e1483d51 100644 --- a/lib/Doctrine/ORM/Import/Reader.php +++ b/lib/Doctrine/ORM/Import/Reader/AbstractReader.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Import\Reader; + /** * class Doctrine_Import_Reader * Is responsible of reading a database definitions from a source and costructing a @@ -32,21 +34,7 @@ * @version $Revision: 3882 $ * @author Konsta Vesterinen */ -abstract class Doctrine_Import_Reader +abstract class AbstractRader { - - /** Aggregations: */ - - /** Compositions: */ - - /*** Attributes: ***/ - - /** - * - * @return Doctrine_Schema - * @abstract - * @access public - */ - abstract public function read( ); - + abstract public function read(); } \ No newline at end of file diff --git a/lib/Doctrine/ORM/Import/Reader/Db.php b/lib/Doctrine/ORM/Import/Reader/Db.php index 7286661fb..3936e12fb 100644 --- a/lib/Doctrine/ORM/Import/Reader/Db.php +++ b/lib/Doctrine/ORM/Import/Reader/Db.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Import\Reader; + /** * class Doctrine_Import_Reader_Db * Reads a database using the given PDO connection and constructs a database @@ -32,14 +34,8 @@ * @version $Revision: 3882 $ * @author Konsta Vesterinen */ -class Doctrine_Import_Reader_Db extends Doctrine_Import_Reader +class Db extends AbstractReader { - /** Aggregations: */ - - /** Compositions: */ - - /*** Attributes: ***/ - /** * @access private */ diff --git a/lib/Doctrine/ORM/Import/Reader/Exception.php b/lib/Doctrine/ORM/Import/Reader/Exception.php deleted file mode 100644 index 1a41f6f61..000000000 --- a/lib/Doctrine/ORM/Import/Reader/Exception.php +++ /dev/null @@ -1,42 +0,0 @@ -. - */ - -/** - * 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 - */ -class Doctrine_Import_Reader_Exception -{ - - /** Aggregations: */ - - /** Compositions: */ - - /*** Attributes: ***/ - -} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Import/Reader/Propel.php b/lib/Doctrine/ORM/Import/Reader/Propel.php index 055ff379f..9ec8fd922 100644 --- a/lib/Doctrine/ORM/Import/Reader/Propel.php +++ b/lib/Doctrine/ORM/Import/Reader/Propel.php @@ -18,7 +18,9 @@ * and is licensed under the LGPL. For more information, see * . */ -Doctrine::autoload('Doctrine_Import_Reader'); + +namespace Doctrine\ORM\Import\Reader; + /** * class Doctrine_Import_Reader_Xml_Propel * @@ -30,15 +32,8 @@ Doctrine::autoload('Doctrine_Import_Reader'); * @version $Revision: 3882 $ * @author Konsta Vesterinen */ -class Doctrine_Import_Reader_Xml_Propel extends Doctrine_Import_Reader +class Propel extends AbstractReader { - - /** Aggregations: */ - - /** Compositions: */ - - /*** Attributes: ***/ - /** * @access private */ diff --git a/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php b/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php index 5be57fe8e..e173f0394 100644 --- a/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php +++ b/lib/Doctrine/ORM/Internal/CommitOrderCalculator.php @@ -145,6 +145,4 @@ class CommitOrderCalculator { array_unshift($this->_sorted, $node->getClass()); } -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Internal/CommitOrderNode.php b/lib/Doctrine/ORM/Internal/CommitOrderNode.php index a658dae4b..d3dd048f3 100644 --- a/lib/Doctrine/ORM/Internal/CommitOrderNode.php +++ b/lib/Doctrine/ORM/Internal/CommitOrderNode.php @@ -161,5 +161,4 @@ class CommitOrderNode { $this->_relatedNodes[] = $node; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php b/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php index b76d7485d..748639550 100644 --- a/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php +++ b/lib/Doctrine/ORM/Internal/Hydration/AbstractHydrator.php @@ -362,4 +362,4 @@ abstract class AbstractHydrator { $this->_isResultMixed = $bool; } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php b/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php index 8635c1be9..fe8300ba6 100644 --- a/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php +++ b/lib/Doctrine/ORM/Internal/Hydration/ArrayHydrator.php @@ -208,5 +208,4 @@ class ArrayHydrator extends AbstractHydrator { return array(); } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Internal/Hydration/Exception.php b/lib/Doctrine/ORM/Internal/Hydration/Exception.php deleted file mode 100644 index 63ed67380..000000000 --- a/lib/Doctrine/ORM/Internal/Hydration/Exception.php +++ /dev/null @@ -1,49 +0,0 @@ -. - */ - -/** - * 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 - */ -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 diff --git a/lib/Doctrine/ORM/Internal/Hydration/HydrationException.php b/lib/Doctrine/ORM/Internal/Hydration/HydrationException.php index 19c6c2e07..6c4060a0d 100644 --- a/lib/Doctrine/ORM/Internal/Hydration/HydrationException.php +++ b/lib/Doctrine/ORM/Internal/Hydration/HydrationException.php @@ -4,11 +4,8 @@ namespace Doctrine\ORM\Internal\Hydration; class HydrationException extends \Doctrine\Common\DoctrineException { - public static function nonUniqueResult() { return new self("The result returned by the query was not unique."); } - -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Internal/Hydration/IterableResult.php b/lib/Doctrine/ORM/Internal/Hydration/IterableResult.php index d0476d265..e3494a50a 100644 --- a/lib/Doctrine/ORM/Internal/Hydration/IterableResult.php +++ b/lib/Doctrine/ORM/Internal/Hydration/IterableResult.php @@ -46,5 +46,4 @@ class IterableResult { return $this->_hydrator->hydrateRow(); } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php b/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php index 56e7f387e..6b12add6f 100644 --- a/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php +++ b/lib/Doctrine/ORM/Internal/Hydration/ObjectHydrator.php @@ -395,5 +395,4 @@ class ObjectHydrator extends AbstractHydrator { return new \Doctrine\Common\Collections\Collection; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Internal/Hydration/ScalarHydrator.php b/lib/Doctrine/ORM/Internal/Hydration/ScalarHydrator.php index 9b8984c9d..a8a271492 100644 --- a/lib/Doctrine/ORM/Internal/Hydration/ScalarHydrator.php +++ b/lib/Doctrine/ORM/Internal/Hydration/ScalarHydrator.php @@ -36,5 +36,4 @@ class ScalarHydrator extends AbstractHydrator { return array(); } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php b/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php index f968f1db9..586e00b70 100644 --- a/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php +++ b/lib/Doctrine/ORM/Internal/Hydration/SingleScalarHydrator.php @@ -33,5 +33,4 @@ class SingleScalarHydrator extends AbstractHydrator { return array(); } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Mapping/AssociationMapping.php b/lib/Doctrine/ORM/Mapping/AssociationMapping.php index 88c591917..7dedd282f 100644 --- a/lib/Doctrine/ORM/Mapping/AssociationMapping.php +++ b/lib/Doctrine/ORM/Mapping/AssociationMapping.php @@ -339,5 +339,4 @@ abstract class AssociationMapping } abstract public function lazyLoadFor($entity, $entityManager); -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadata.php b/lib/Doctrine/ORM/Mapping/ClassMetadata.php index 18865042f..6ac0f71ea 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadata.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadata.php @@ -1476,5 +1476,4 @@ final class ClassMetadata { return __CLASS__ . '@' . spl_object_hash($this); } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php b/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php index eb8bca9fc..a3b2a3b91 100644 --- a/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php +++ b/lib/Doctrine/ORM/Mapping/ClassMetadataFactory.php @@ -205,7 +205,4 @@ class ClassMetadataFactory } } } -} - - - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php index dcbdd1f91..2c5640eec 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php +++ b/lib/Doctrine/ORM/Mapping/Driver/AnnotationDriver.php @@ -173,4 +173,4 @@ class AnnotationDriver return strpos($docComment, '@DoctrineEntity') === false && strpos($docComment, '@DoctrineMappedSuperclass') === false; } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php b/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php index 6f48c4ae1..6e1e8856c 100644 --- a/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php +++ b/lib/Doctrine/ORM/Mapping/Driver/DoctrineAnnotations.php @@ -83,4 +83,4 @@ final class DoctrineJoinTable extends \Addendum\Annotation { public $schema; public $joinColumns; public $inverseJoinColumns; -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Mapping/ManyToManyMapping.php b/lib/Doctrine/ORM/Mapping/ManyToManyMapping.php index 521d54801..89838c543 100644 --- a/lib/Doctrine/ORM/Mapping/ManyToManyMapping.php +++ b/lib/Doctrine/ORM/Mapping/ManyToManyMapping.php @@ -141,5 +141,4 @@ class ManyToManyMapping extends AssociationMapping { return true; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Mapping/MappingException.php b/lib/Doctrine/ORM/Mapping/MappingException.php index a581f76ed..2c76ba761 100644 --- a/lib/Doctrine/ORM/Mapping/MappingException.php +++ b/lib/Doctrine/ORM/Mapping/MappingException.php @@ -83,6 +83,4 @@ class MappingException extends \Doctrine\Common\DoctrineException { return new self("The mapping of field '$fieldName' is invalid."); } -} - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Mapping/OneToManyMapping.php b/lib/Doctrine/ORM/Mapping/OneToManyMapping.php index 01bad0734..6d8c30a0c 100644 --- a/lib/Doctrine/ORM/Mapping/OneToManyMapping.php +++ b/lib/Doctrine/ORM/Mapping/OneToManyMapping.php @@ -112,6 +112,4 @@ class OneToManyMapping extends AssociationMapping { } - -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Mapping/OneToOneMapping.php b/lib/Doctrine/ORM/Mapping/OneToOneMapping.php index eb9f20eb5..8fd51c925 100644 --- a/lib/Doctrine/ORM/Mapping/OneToOneMapping.php +++ b/lib/Doctrine/ORM/Mapping/OneToOneMapping.php @@ -163,6 +163,4 @@ class OneToOneMapping extends AssociationMapping } $sourceClass->getReflectionProperty($this->_sourceFieldName)->setValue($entity, $otherEntity); } - -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/PersistentCollection.php b/lib/Doctrine/ORM/PersistentCollection.php index 88dd0fa75..8406e10e2 100644 --- a/lib/Doctrine/ORM/PersistentCollection.php +++ b/lib/Doctrine/ORM/PersistentCollection.php @@ -395,4 +395,4 @@ final class PersistentCollection extends \Doctrine\Common\Collections\Collection { $this->_isDirty = $dirty; } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php b/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php index 60703727e..8b81c66d1 100644 --- a/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php +++ b/lib/Doctrine/ORM/Persisters/AbstractCollectionPersister.php @@ -160,5 +160,4 @@ abstract class AbstractCollectionPersister * @param mixed $element */ abstract protected function _getInsertRowSqlParameters(PersistentCollection $coll, $element); -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Persisters/AbstractEntityPersister.php b/lib/Doctrine/ORM/Persisters/AbstractEntityPersister.php index bba16614d..548541081 100644 --- a/lib/Doctrine/ORM/Persisters/AbstractEntityPersister.php +++ b/lib/Doctrine/ORM/Persisters/AbstractEntityPersister.php @@ -237,4 +237,4 @@ abstract class AbstractEntityPersister $result[$discColumn['name']] = array_search($this->_entityName, $discMap); } } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Persisters/ElementCollectionPersister.php b/lib/Doctrine/ORM/Persisters/ElementCollectionPersister.php index 947f51ef6..ed802ac5e 100644 --- a/lib/Doctrine/ORM/Persisters/ElementCollectionPersister.php +++ b/lib/Doctrine/ORM/Persisters/ElementCollectionPersister.php @@ -29,5 +29,4 @@ namespace Doctrine\ORM\Persisters; class ElementCollectionPersister extends AbstractCollectionPersister { //put your code here -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Persisters/Exception.php b/lib/Doctrine/ORM/Persisters/Exception.php deleted file mode 100644 index 36965d7bc..000000000 --- a/lib/Doctrine/ORM/Persisters/Exception.php +++ /dev/null @@ -1,38 +0,0 @@ -. - */ - -#namespace Doctrine::ORM; - -/** - * Doctrine_EntityPersister_Exception - * - * @package Doctrine - * @subpackage Entity - * @author Konsta Vesterinen - * @author Roman Borschel - * @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 diff --git a/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php b/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php index 9bea3c0e4..b3d9345fc 100644 --- a/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php +++ b/lib/Doctrine/ORM/Persisters/JoinedSubclassPersister.php @@ -277,5 +277,4 @@ class JoinedSubclassPersister extends AbstractEntityPersister return $dataSet; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php b/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php index 9f69c098d..7967299c4 100644 --- a/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php +++ b/lib/Doctrine/ORM/Persisters/ManyToManyPersister.php @@ -126,5 +126,4 @@ class ManyToManyPersister extends AbstractCollectionPersister // rely on a specific ordering of the columns. return $this->_uow->getEntityIdentifier($coll->getOwner()); } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Persisters/OneToManyPersister.php b/lib/Doctrine/ORM/Persisters/OneToManyPersister.php index eb89fa53b..2ab99e9fb 100644 --- a/lib/Doctrine/ORM/Persisters/OneToManyPersister.php +++ b/lib/Doctrine/ORM/Persisters/OneToManyPersister.php @@ -73,6 +73,4 @@ class OneToManyPersister extends AbstractCollectionPersister { return; } - -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Persisters/SingleTablePersister.php b/lib/Doctrine/ORM/Persisters/SingleTablePersister.php index 15c5adc7f..9da608243 100644 --- a/lib/Doctrine/ORM/Persisters/SingleTablePersister.php +++ b/lib/Doctrine/ORM/Persisters/SingleTablePersister.php @@ -1,3 +1,8 @@ \ No newline at end of file +namespace Doctrine\ORM\Persisters; + +class SingleTablePersister extends AbstractEntityPersister +{ + +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Persisters/UnionSubclassPersister.php b/lib/Doctrine/ORM/Persisters/UnionSubclassPersister.php index 15c5adc7f..05ee49b7e 100644 --- a/lib/Doctrine/ORM/Persisters/UnionSubclassPersister.php +++ b/lib/Doctrine/ORM/Persisters/UnionSubclassPersister.php @@ -1,3 +1,8 @@ \ No newline at end of file +namespace Doctrine\ORM\Persisters; + +class UnionSubclassPersister extends AbstractEntityPersister +{ + +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query.php b/lib/Doctrine/ORM/Query.php index e290b6ca6..1f559e6fb 100644 --- a/lib/Doctrine/ORM/Query.php +++ b/lib/Doctrine/ORM/Query.php @@ -587,4 +587,4 @@ class Query extends AbstractQuery $this->_execute($params, $hydrationMode), $this->_parserResult ); } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/AggregateExpression.php b/lib/Doctrine/ORM/Query/AST/AggregateExpression.php index 8e799cc36..4a355d5bf 100644 --- a/lib/Doctrine/ORM/Query/AST/AggregateExpression.php +++ b/lib/Doctrine/ORM/Query/AST/AggregateExpression.php @@ -38,5 +38,4 @@ class AggregateExpression extends Node { return $this->_functionName; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/ArithmeticExpression.php b/lib/Doctrine/ORM/Query/AST/ArithmeticExpression.php index 6e008a61b..f49ec93cc 100644 --- a/lib/Doctrine/ORM/Query/AST/ArithmeticExpression.php +++ b/lib/Doctrine/ORM/Query/AST/ArithmeticExpression.php @@ -18,13 +18,17 @@ class ArithmeticExpression extends Node public function setSimpleArithmeticExpression($simpleArithmeticExpr) { - if ($this->_subselect) throw \Doctrine\Common\DoctrineException::updateMe(); + if ($this->_subselect) { + throw \Doctrine\Common\DoctrineException::updateMe(); + } $this->_simpleArithmeticExpression = $simpleArithmeticExpr; } public function setSubselect($subselect) { - if ($this->_simpleArithmeticExpression) throw \Doctrine\Common\DoctrineException::updateMe(); + if ($this->_simpleArithmeticExpression){ + throw \Doctrine\Common\DoctrineException::updateMe(); + } $this->_subselect = $subselect; } @@ -40,12 +44,11 @@ class ArithmeticExpression extends Node public function isSimpleArithmeticExpression() { - return (bool)$this->_simpleArithmeticExpression; + return (bool) $this->_simpleArithmeticExpression; } public function isSubselect() { - return (bool)$this->_subselect; + return (bool) $this->_subselect; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/ArithmeticFactor.php b/lib/Doctrine/ORM/Query/AST/ArithmeticFactor.php index f93c8c95d..c2c9c94a1 100644 --- a/lib/Doctrine/ORM/Query/AST/ArithmeticFactor.php +++ b/lib/Doctrine/ORM/Query/AST/ArithmeticFactor.php @@ -38,5 +38,4 @@ class ArithmeticFactor extends Node { return $this->_nSigned; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/ArithmeticTerm.php b/lib/Doctrine/ORM/Query/AST/ArithmeticTerm.php index 057fd4440..1ce611b19 100644 --- a/lib/Doctrine/ORM/Query/AST/ArithmeticTerm.php +++ b/lib/Doctrine/ORM/Query/AST/ArithmeticTerm.php @@ -24,5 +24,4 @@ class ArithmeticTerm extends Node { return $this->_factors; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/ComparisonExpression.php b/lib/Doctrine/ORM/Query/AST/ComparisonExpression.php index fbbd20a4c..f2cf87ad7 100644 --- a/lib/Doctrine/ORM/Query/AST/ComparisonExpression.php +++ b/lib/Doctrine/ORM/Query/AST/ComparisonExpression.php @@ -43,5 +43,4 @@ class ComparisonExpression extends Node { return $this->_operator; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/ComparisonOperator.php b/lib/Doctrine/ORM/Query/AST/ComparisonOperator.php index 0db7c769f..662da36c5 100644 --- a/lib/Doctrine/ORM/Query/AST/ComparisonOperator.php +++ b/lib/Doctrine/ORM/Query/AST/ComparisonOperator.php @@ -35,5 +35,4 @@ namespace Doctrine\ORM\Query\AST; */ class ComparisonOperator extends Node { - -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/ConditionalExpression.php b/lib/Doctrine/ORM/Query/AST/ConditionalExpression.php index 0479dddd2..1d019b531 100644 --- a/lib/Doctrine/ORM/Query/AST/ConditionalExpression.php +++ b/lib/Doctrine/ORM/Query/AST/ConditionalExpression.php @@ -24,5 +24,4 @@ class ConditionalExpression extends Node { return $this->_conditionalTerms; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/ConditionalFactor.php b/lib/Doctrine/ORM/Query/AST/ConditionalFactor.php index bf69abe1c..e7f460980 100644 --- a/lib/Doctrine/ORM/Query/AST/ConditionalFactor.php +++ b/lib/Doctrine/ORM/Query/AST/ConditionalFactor.php @@ -31,5 +31,4 @@ class ConditionalFactor extends Node { return $this->_conditionalPrimary; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/ConditionalPrimary.php b/lib/Doctrine/ORM/Query/AST/ConditionalPrimary.php index b776076ae..15f62d2f2 100644 --- a/lib/Doctrine/ORM/Query/AST/ConditionalPrimary.php +++ b/lib/Doctrine/ORM/Query/AST/ConditionalPrimary.php @@ -38,12 +38,11 @@ class ConditionalPrimary extends Node public function isSimpleConditionalExpression() { - return (bool)$this->_simpleConditionalExpression; + return (bool) $this->_simpleConditionalExpression; } public function isConditionalExpression() { - return (bool)$this->_conditionalExpression; + return (bool) $this->_conditionalExpression; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/ConditionalTerm.php b/lib/Doctrine/ORM/Query/AST/ConditionalTerm.php index 41956f8a1..b665f81bd 100644 --- a/lib/Doctrine/ORM/Query/AST/ConditionalTerm.php +++ b/lib/Doctrine/ORM/Query/AST/ConditionalTerm.php @@ -24,5 +24,4 @@ class ConditionalTerm extends Node { return $this->_conditionalFactors; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/DeleteStatement.php b/lib/Doctrine/ORM/Query/AST/DeleteStatement.php index ad859aafe..04f8e9477 100644 --- a/lib/Doctrine/ORM/Query/AST/DeleteStatement.php +++ b/lib/Doctrine/ORM/Query/AST/DeleteStatement.php @@ -33,36 +33,30 @@ namespace Doctrine\ORM\Query\AST; class DeleteStatement extends Node { protected $_deleteClause; - protected $_whereClause; - /* Setters */ public function setDeleteClause($deleteClause) { $this->_deleteClause = $deleteClause; } - public function setWhereClause($whereClause) { $this->_whereClause = $whereClause; } - /* Getters */ public function getDeleteClause() { return $this->_deleteClause; } - public function getWhereClause() { return $this->_whereClause; } - /* REMOVE ME LATER. COPIED METHODS FROM SPLIT OF PRODUCTION INTO "AST" AND "PARSER" */ public function buildSql() @@ -72,4 +66,4 @@ class DeleteStatement extends Node return $this->_deleteClause->buildSql() . (($this->_whereClause !== null) ? ' ' . $this->_whereClause->buildSql() : ' WHERE 1 = 1'); } -} \ No newline at end of file +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/FromClause.php b/lib/Doctrine/ORM/Query/AST/FromClause.php index 2267e1019..14bbb8563 100644 --- a/lib/Doctrine/ORM/Query/AST/FromClause.php +++ b/lib/Doctrine/ORM/Query/AST/FromClause.php @@ -45,9 +45,7 @@ class FromClause extends Node return $this->_identificationVariableDeclarations; } - /* REMOVE ME LATER. COPIED METHODS FROM SPLIT OF PRODUCTION INTO "AST" AND "PARSER" */ - public function buildSql() { //echo "FromClause:\n"; @@ -60,7 +58,6 @@ class FromClause extends Node return 'FROM ' . implode(', ', $this->_mapIdentificationVariableDeclarations()); } - protected function _mapIdentificationVariableDeclarations() { return array_map( @@ -68,9 +65,8 @@ class FromClause extends Node ); } - protected function _mapIdentificationVariableDeclaration($value) { return $value->buildSql(); } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/Function.php b/lib/Doctrine/ORM/Query/AST/Function.php index 7fa7adcbb..98b5451e8 100644 --- a/lib/Doctrine/ORM/Query/AST/Function.php +++ b/lib/Doctrine/ORM/Query/AST/Function.php @@ -14,7 +14,4 @@ namespace Doctrine\ORM\Query\AST; class FunctionNode extends Node { private $_name; - - -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/GroupByClause.php b/lib/Doctrine/ORM/Query/AST/GroupByClause.php index c70db146e..1715991db 100644 --- a/lib/Doctrine/ORM/Query/AST/GroupByClause.php +++ b/lib/Doctrine/ORM/Query/AST/GroupByClause.php @@ -24,5 +24,4 @@ class GroupByClause extends Node { return $this->_groupByItems; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php b/lib/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php index 45c436044..2f13ffacd 100644 --- a/lib/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php +++ b/lib/Doctrine/ORM/Query/AST/IdentificationVariableDeclaration.php @@ -63,7 +63,6 @@ class IdentificationVariableDeclaration extends Node return $this->_joinVariableDeclarations; } - /* REMOVE ME LATER. COPIED METHODS FROM SPLIT OF PRODUCTION INTO "AST" AND "PARSER" */ public function buildSql() diff --git a/lib/Doctrine/ORM/Query/AST/InputParameter.php b/lib/Doctrine/ORM/Query/AST/InputParameter.php index 66a3335a1..36e110c4a 100644 --- a/lib/Doctrine/ORM/Query/AST/InputParameter.php +++ b/lib/Doctrine/ORM/Query/AST/InputParameter.php @@ -47,5 +47,4 @@ class InputParameter extends Node { return $this->_position; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/Join.php b/lib/Doctrine/ORM/Query/AST/Join.php index 96c1b0b41..c0f42c3eb 100644 --- a/lib/Doctrine/ORM/Query/AST/Join.php +++ b/lib/Doctrine/ORM/Query/AST/Join.php @@ -34,25 +34,15 @@ namespace Doctrine\ORM\Query\AST; class Join extends Node { const JOIN_TYPE_LEFT = 1; - const JOIN_TYPE_LEFTOUTER = 2; - const JOIN_TYPE_INNER = 3; - - const JOIN_WHERE_ON = 1; - const JOIN_WHERE_WITH = 2; - - protected $_joinType = self::JOIN_TYPE_INNER; - + protected $_joinType = self::JOIN_TYPE_INNER; protected $_joinAssociationPathExpression = null; - protected $_aliasIdentificationVariable = null; - protected $_whereType = self::JOIN_WHERE_WITH; - protected $_conditionalExpression = null; public function __construct($joinType, $joinAssocPathExpr, $aliasIdentVar) @@ -74,7 +64,6 @@ class Join extends Node $this->_conditionalExpression = $conditionalExpression; } - /* Getters */ public function getJoinType() { @@ -101,7 +90,6 @@ class Join extends Node return $this->_conditionalExpression; } - /* REMOVE ME LATER. COPIED METHODS FROM SPLIT OF PRODUCTION INTO "AST" AND "PARSER" */ public function buildSql() diff --git a/lib/Doctrine/ORM/Query/AST/JoinPathExpression.php b/lib/Doctrine/ORM/Query/AST/JoinPathExpression.php index 2d1b868e3..d55bb821d 100644 --- a/lib/Doctrine/ORM/Query/AST/JoinPathExpression.php +++ b/lib/Doctrine/ORM/Query/AST/JoinPathExpression.php @@ -31,5 +31,4 @@ class JoinPathExpression extends Node { return $this->_assocField; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/JoinVariableDeclaration.php b/lib/Doctrine/ORM/Query/AST/JoinVariableDeclaration.php index 8db47445e..cfb4bff46 100644 --- a/lib/Doctrine/ORM/Query/AST/JoinVariableDeclaration.php +++ b/lib/Doctrine/ORM/Query/AST/JoinVariableDeclaration.php @@ -33,7 +33,6 @@ namespace Doctrine\ORM\Query\AST; class JoinVariableDeclaration extends Node { protected $_join = null; - protected $_indexBy = null; public function __construct($join, $indexBy) @@ -48,15 +47,12 @@ class JoinVariableDeclaration extends Node return $this->_join; } - public function getIndexBy() { return $this->_indexBy; } - /* REMOVE ME LATER. COPIED METHODS FROM SPLIT OF PRODUCTION INTO "AST" AND "PARSER" */ - public function buildSql() { return $this->_join->buildSql() . (isset($this->_indexby) ? $this->_indexby->buildSql() . ' ' : ''); diff --git a/lib/Doctrine/ORM/Query/AST/LikeExpression.php b/lib/Doctrine/ORM/Query/AST/LikeExpression.php index c89e5e889..7959fbf1b 100644 --- a/lib/Doctrine/ORM/Query/AST/LikeExpression.php +++ b/lib/Doctrine/ORM/Query/AST/LikeExpression.php @@ -45,5 +45,4 @@ class LikeExpression extends Node { return $this->_escapeChar; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/PathExpression.php b/lib/Doctrine/ORM/Query/AST/PathExpression.php index 47ec78983..50f13fa38 100644 --- a/lib/Doctrine/ORM/Query/AST/PathExpression.php +++ b/lib/Doctrine/ORM/Query/AST/PathExpression.php @@ -95,5 +95,4 @@ class PathExpression extends Node { $this->_collectionValuedAssociationFields[$part] = true; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php b/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php index f267857f7..07f689695 100644 --- a/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php +++ b/lib/Doctrine/ORM/Query/AST/RangeVariableDeclaration.php @@ -59,9 +59,7 @@ class RangeVariableDeclaration extends Node return $this->_classMetadata; } - /* REMOVE ME LATER. COPIED METHODS FROM SPLIT OF PRODUCTION INTO "AST" AND "PARSER" */ - public function buildSql() { // Retrieving connection diff --git a/lib/Doctrine/ORM/Query/AST/SelectClause.php b/lib/Doctrine/ORM/Query/AST/SelectClause.php index 6bdb5ded0..a129bcfb3 100644 --- a/lib/Doctrine/ORM/Query/AST/SelectClause.php +++ b/lib/Doctrine/ORM/Query/AST/SelectClause.php @@ -48,30 +48,25 @@ class SelectClause extends Node return $this->_isDistinct; } - public function getSelectExpressions() { return $this->_selectExpressions; } - /* REMOVE ME LATER. COPIED METHODS FROM SPLIT OF PRODUCTION INTO "AST" AND "PARSER" */ - public function buildSql() { return 'SELECT ' . (($this->_isDistinct) ? 'DISTINCT ' : '') . implode(', ', $this->_mapSelectExpressions()); } - protected function _mapSelectExpressions() { return array_map(array(&$this, '_mapSelectExpression'), $this->_selectExpressions); } - protected function _mapSelectExpression($value) { return is_object($value) ? $value->buildSql() : $value; } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/SelectExpression.php b/lib/Doctrine/ORM/Query/AST/SelectExpression.php index 7cf2da0b0..a107fe248 100644 --- a/lib/Doctrine/ORM/Query/AST/SelectExpression.php +++ b/lib/Doctrine/ORM/Query/AST/SelectExpression.php @@ -34,7 +34,6 @@ namespace Doctrine\ORM\Query\AST; class SelectExpression extends Node { protected $_expression; - protected $_fieldIdentificationVariable; public function __construct($expression, $fieldIdentificationVariable) diff --git a/lib/Doctrine/ORM/Query/AST/SelectStatement.php b/lib/Doctrine/ORM/Query/AST/SelectStatement.php index 97edc4b2c..7d7629ff2 100644 --- a/lib/Doctrine/ORM/Query/AST/SelectStatement.php +++ b/lib/Doctrine/ORM/Query/AST/SelectStatement.php @@ -55,37 +55,31 @@ class SelectStatement extends Node return $this->_selectClause; } - public function getFromClause() { return $this->_fromClause; } - public function getWhereClause() { return $this->_whereClause; } - public function getGroupByClause() { return $this->_groupByClause; } - public function getHavingClause() { return $this->_havingClause; } - public function getOrderByClause() { return $this->_orderByClause; } - /* REMOVE ME LATER. COPIED METHODS FROM SPLIT OF PRODUCTION INTO "AST" AND "PARSER" */ public function buildSql() diff --git a/lib/Doctrine/ORM/Query/AST/SimpleArithmeticExpression.php b/lib/Doctrine/ORM/Query/AST/SimpleArithmeticExpression.php index 4e5f07a85..6f4b0e8e9 100644 --- a/lib/Doctrine/ORM/Query/AST/SimpleArithmeticExpression.php +++ b/lib/Doctrine/ORM/Query/AST/SimpleArithmeticExpression.php @@ -24,5 +24,4 @@ class SimpleArithmeticExpression extends Node { return $this->_terms; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AST/SimpleStateFieldPathExpression.php b/lib/Doctrine/ORM/Query/AST/SimpleStateFieldPathExpression.php index 2ca59a07f..1ca3b029a 100644 --- a/lib/Doctrine/ORM/Query/AST/SimpleStateFieldPathExpression.php +++ b/lib/Doctrine/ORM/Query/AST/SimpleStateFieldPathExpression.php @@ -33,7 +33,6 @@ namespace Doctrine\ORM\Query\AST; class SimpleStateFieldPathExpression extends Node { protected $_identificationVariable = null; - protected $_simpleStateField = null; public function __construct($identificationVariable, $simpleStateField) @@ -48,7 +47,6 @@ class SimpleStateFieldPathExpression extends Node return $this->_identificationVariable; } - public function getSimpleStateField() { return $this->_simpleStateField; diff --git a/lib/Doctrine/ORM/Query/AST/UpdateStatetement.php b/lib/Doctrine/ORM/Query/AST/UpdateStatetement.php index db1cd1bb0..c900f730d 100644 --- a/lib/Doctrine/ORM/Query/AST/UpdateStatetement.php +++ b/lib/Doctrine/ORM/Query/AST/UpdateStatetement.php @@ -33,22 +33,18 @@ namespace Doctrine\ORM\Query\AST; class UpdateStatement extends Node { protected $_updateClause; - protected $_whereClause; - /* Setters */ public function setUpdateClause($updateClause) { $this->_updateClause = $updateClause; } - public function setWhereClause($whereClause) { $this->_whereClause = $whereClause; } - /* Getters */ public function getUpdateClause() @@ -56,15 +52,12 @@ class UpdateStatement extends Node return $this->_updateClause; } - public function getWhereClause() { return $this->_whereClause; } - /* REMOVE ME LATER. COPIED METHODS FROM SPLIT OF PRODUCTION INTO "AST" AND "PARSER" */ - public function buildSql() { // The 1=1 is needed to workaround the affected_rows in MySQL. diff --git a/lib/Doctrine/ORM/Query/AST/WhereClause.php b/lib/Doctrine/ORM/Query/AST/WhereClause.php index 5585168ec..5d19dbd05 100644 --- a/lib/Doctrine/ORM/Query/AST/WhereClause.php +++ b/lib/Doctrine/ORM/Query/AST/WhereClause.php @@ -24,5 +24,4 @@ class WhereClause extends Node { return $this->_conditionalExpression; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/AbstractResult.php b/lib/Doctrine/ORM/Query/AbstractResult.php index 73035b824..89c9a10c3 100644 --- a/lib/Doctrine/ORM/Query/AbstractResult.php +++ b/lib/Doctrine/ORM/Query/AbstractResult.php @@ -62,7 +62,6 @@ abstract class AbstractResult */ protected $_enumParams; - /** * Cannot be called directly, factory methods handle this job. * @@ -80,7 +79,6 @@ abstract class AbstractResult $this->_enumParams = $enumParams; } - /** * Defines the mapping components. * @@ -91,7 +89,6 @@ abstract class AbstractResult $this->_queryComponents = $queryComponents; } - /** * Sets the declaration for given component alias. * @@ -103,7 +100,6 @@ abstract class AbstractResult $this->_queryComponents[$componentAlias] = $queryComponent; } - /** * Gets the mapping components. * @@ -114,7 +110,6 @@ abstract class AbstractResult return $this->_queryComponents; } - /** * Get the declaration for given component alias. * @@ -130,7 +125,6 @@ abstract class AbstractResult return $this->_queryComponents[$componentAlias]; } - /** * Get the component alias for a given query component * @@ -142,7 +136,6 @@ abstract class AbstractResult return array_search($queryComponent, $this->_queryComponents);; } - /** * Whether or not this object has a declaration for given component alias. * @@ -154,7 +147,6 @@ abstract class AbstractResult return isset($this->_queryComponents[$componentAlias]); } - /** * Defines the table aliases. * @@ -165,7 +157,6 @@ abstract class AbstractResult $this->_tableAliasMap = $tableAliasMap; } - /** * Adds an SQL table alias and associates it a component alias * @@ -177,7 +168,6 @@ abstract class AbstractResult $this->_tableAliasMap[$tableAlias] = $componentAlias; } - /** * Returns all table aliases. * @@ -188,7 +178,6 @@ abstract class AbstractResult return $this->_tableAliasMap; } - /** * Get DQL alias associated with given SQL table alias. * @@ -204,7 +193,6 @@ abstract class AbstractResult return $this->_tableAliasMap[$tableAlias]; } - /** * Get table alias associated with given component alias. * @@ -216,7 +204,6 @@ abstract class AbstractResult return array_search($componentAlias, $this->_tableAliasMap); } - /** * Whether or not this object has given tableAlias. * @@ -228,7 +215,6 @@ abstract class AbstractResult return (isset($this->_tableAliasMap[$tableAlias])); } - /** * Returns the enum parameters. * @@ -239,7 +225,6 @@ abstract class AbstractResult return $this->_enumParams; } - /** * Sets input parameter as an enumerated parameter * @@ -259,7 +244,6 @@ abstract class AbstractResult return $this; } - /** * Returns this object in serialized format, revertable using fromCached*. * diff --git a/lib/Doctrine/ORM/Query/CacheHandler.php b/lib/Doctrine/ORM/Query/CacheHandler.php index d271f99ef..3385e06ab 100644 --- a/lib/Doctrine/ORM/Query/CacheHandler.php +++ b/lib/Doctrine/ORM/Query/CacheHandler.php @@ -19,10 +19,10 @@ * . */ -#namespace Doctrine\ORM\Query; +namespace Doctrine\ORM\Query; /** - * Doctrine_ORM_Query_CacheHandler + * Doctrine\ORM\Query\CacheHandler * * @license http://www.opensource.org/licenses/lgpl-license.php LGPL * @link www.doctrine-project.com @@ -33,7 +33,7 @@ * * @todo Re-document this class */ -abstract class Doctrine_ORM_Query_CacheHandler +abstract class CacheHandler { /** * Static factory method. Receives a Doctrine_ORM_Query object and generates @@ -64,7 +64,7 @@ abstract class Doctrine_ORM_Query_CacheHandler } } - return new Doctrine_ORM_Query_QueryResult( + return new QueryResult( $result, $queryComponents, $parserResult->getTableAliasMap(), @@ -72,8 +72,6 @@ abstract class Doctrine_ORM_Query_CacheHandler ); } - - /** * Static factory method. Receives a Doctrine_ORM_Query object and a cached data. * It handles the cache and generates the object after processing queryComponents. @@ -86,7 +84,7 @@ abstract class Doctrine_ORM_Query_CacheHandler { $cached = unserialize($cached); - return new Doctrine_ORM_Query_QueryResult( + return new QueryResult( $cached[0], self::_getQueryComponents($cached[1]), $cached[2], @@ -94,7 +92,6 @@ abstract class Doctrine_ORM_Query_CacheHandler ); } - /** * Static factory method. Receives a Doctrine_ORM_Query object and a cached data. * It handles the cache and generates the object after processing queryComponents. @@ -107,7 +104,7 @@ abstract class Doctrine_ORM_Query_CacheHandler { $cached = unserialize($cached); - return new Doctrine_ORM_Query_ParserResult( + return new ParserResult( $cached[0], self::_getQueryComponents($cached[1]), $cached[2], @@ -115,7 +112,6 @@ abstract class Doctrine_ORM_Query_CacheHandler ); } - /** * @nodoc */ @@ -147,5 +143,4 @@ abstract class Doctrine_ORM_Query_CacheHandler return $queryComponents; } - } \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/Exception.php b/lib/Doctrine/ORM/Query/Exception.php deleted file mode 100644 index 7937f168c..000000000 --- a/lib/Doctrine/ORM/Query/Exception.php +++ /dev/null @@ -1,37 +0,0 @@ -. - */ - -/** - * Doctrine_ORM_Query_Exception - * - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link www.phpdoctrine.org - * @since 1.0 - * @version $Revision: 4628 $ - * @author Konsta Vesterinen - */ -class Doctrine_ORM_Query_Exception extends Doctrine_Exception -{ - public static function nonUniqueResult() - { - return new self("The query contains more than one result."); - } -} diff --git a/lib/Doctrine/ORM/Query/Exec/AbstractExecutor.php b/lib/Doctrine/ORM/Query/Exec/AbstractExecutor.php index 62bdbf843..5e2e21914 100644 --- a/lib/Doctrine/ORM/Query/Exec/AbstractExecutor.php +++ b/lib/Doctrine/ORM/Query/Exec/AbstractExecutor.php @@ -85,7 +85,6 @@ abstract class AbstractExecutor implements \Serializable } } - /** * Serializes the sql statements of the executor. * @@ -96,7 +95,6 @@ abstract class AbstractExecutor implements \Serializable return serialize($this->_sqlStatements); } - /** * Reconstructs the executor with it's sql statements. */ diff --git a/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php b/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php index c7d57f4d0..d0d10c9f7 100644 --- a/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php +++ b/lib/Doctrine/ORM/Query/Exec/MultiTableDeleteExecutor.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Exec; + /** * Executes the SQL statements for bulk DQL DELETE statements on classes in * Class Table Inheritance (JOINED). @@ -32,14 +34,14 @@ * (org.hibernate.hql.ast.exec.MultiTableDeleteExecutor). * @todo Rename to MultiTableDeleteExecutor */ -class Doctrine_ORM_Query_SqlExecutor_MultiTableDelete extends Doctrine_ORM_Query_SqlExecutor_Abstract +class MultiTableDeleteExecutor extends AbstractExecutor { /** * Enter description here... * * @param Doctrine_ORM_Query_AST $AST */ - public function __construct(Doctrine_ORM_Query_AST $AST) + public function __construct(\Doctrine\ORM\Query\AST $AST) { // TODO: Inspect the AST, create the necessary SQL queries and store them // in $this->_sqlStatements @@ -52,7 +54,7 @@ class Doctrine_ORM_Query_SqlExecutor_MultiTableDelete extends Doctrine_ORM_Query * @param array $params The parameters. * @override */ - public function execute(Doctrine_Connection $conn, array $params) + public function execute(\Doctrine\DBAL\Connection $conn, array $params) { //... } diff --git a/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php b/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php index 11673ac4d..8f022c6df 100644 --- a/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php +++ b/lib/Doctrine/ORM/Query/Exec/MultiTableUpdateExecutor.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Exec; + /** * Executes the SQL statements for bulk DQL UPDATE statements on classes in * Class Table Inheritance (JOINED). @@ -32,9 +34,9 @@ * (org.hibernate.hql.ast.exec.MultiTableUpdateExecutor). * @todo Rename to MultiTableUpdateExecutor */ -class Doctrine_ORM_Query_SqlExecutor_MultiTableUpdate extends Doctrine_ORM_Query_SqlExecutor_Abstract +class MultiTableUpdateExecutor extends AbstractExecutor { - public function __construct(Doctrine_ORM_Query_AST $AST) + public function __construct(\Doctrine\ORM\Query\AST $AST) { // TODO: Inspect the AST, create the necessary SQL queries and store them // in $this->_sqlStatements @@ -47,7 +49,7 @@ class Doctrine_ORM_Query_SqlExecutor_MultiTableUpdate extends Doctrine_ORM_Query * @param array $params The parameters. * @override */ - public function execute(Doctrine_Connection $conn, array $params) + public function execute(\Doctrine\DBAL\Connection $conn, array $params) { //... } diff --git a/lib/Doctrine/ORM/Query/Lexer.php b/lib/Doctrine/ORM/Query/Lexer.php index a7c4868b4..c4ca03151 100644 --- a/lib/Doctrine/ORM/Query/Lexer.php +++ b/lib/Doctrine/ORM/Query/Lexer.php @@ -281,4 +281,4 @@ class Lexer { $this->_position = $position; } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/Parser.php b/lib/Doctrine/ORM/Query/Parser.php index cdddc4481..e1d0b2560 100644 --- a/lib/Doctrine/ORM/Query/Parser.php +++ b/lib/Doctrine/ORM/Query/Parser.php @@ -117,7 +117,6 @@ class Parser $this->free(true); } - /** * Attempts to match the given token with the current lookahead token. * @@ -173,7 +172,6 @@ class Parser //$this->_errorDistance = self::MIN_ERROR_DISTANCE; } - /** * Parses a query string. */ @@ -1288,4 +1286,4 @@ class Parser $this->syntaxError('StateFieldPathExpression | string | InputParameter | FunctionsReturningStrings | AggregateExpression'); } } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/Parser/AbstractSchemaName.php b/lib/Doctrine/ORM/Query/Parser/AbstractSchemaName.php index 5b40e1930..3abf47dd1 100644 --- a/lib/Doctrine/ORM/Query/Parser/AbstractSchemaName.php +++ b/lib/Doctrine/ORM/Query/Parser/AbstractSchemaName.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * AbstractSchemaName ::= identifier * @@ -29,19 +31,17 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_AbstractSchemaName extends Doctrine_ORM_Query_ParserRule +class AbstractSchemaName extends \Doctrine\ORM\Query\ParserRule { protected $_componentName = null; - - + public function syntax() { // AbstractSchemaName ::= identifier - $this->_parser->match(Doctrine_ORM_Query_Token::T_IDENTIFIER); + $this->_parser->match(\Doctrine\ORM\Query\Token::T_IDENTIFIER); $this->_componentName = $this->_parser->token['value']; } - public function semantical() { // Check if we are dealing with a real Doctrine_Entity or not @@ -55,9 +55,8 @@ class Doctrine_ORM_Query_Parser_AbstractSchemaName extends Doctrine_ORM_Query_Pa return $this->_componentName; } - protected function _isDoctrineEntity($componentName) { - return class_exists($componentName)/* && class_implements($componentName, 'Doctrine_ORM_Entity')*/; + return class_exists($componentName); } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/Parser/AliasIdentificationVariable.php b/lib/Doctrine/ORM/Query/Parser/AliasIdentificationVariable.php index eca986a1c..d0df6fd66 100644 --- a/lib/Doctrine/ORM/Query/Parser/AliasIdentificationVariable.php +++ b/lib/Doctrine/ORM/Query/Parser/AliasIdentificationVariable.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * AliasIdentificationVariable = identifier * @@ -29,15 +31,14 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_AliasIdentificationVariable extends Doctrine_ORM_Query_ParserRule +class AliasIdentificationVariable extends \Doctrine\ORM\Query\ParserRule { protected $_componentAlias = null; - public function syntax() { // AliasIdentificationVariable = identifier - $this->_parser->match(Doctrine_ORM_Query_Token::T_IDENTIFIER); + $this->_parser->match(\Doctrine\ORM\Query\Token::T_IDENTIFIER); $this->_componentAlias = $this->_parser->token['value']; } diff --git a/lib/Doctrine/ORM/Query/Parser/CollectionValuedAssociationField.php b/lib/Doctrine/ORM/Query/Parser/CollectionValuedAssociationField.php index 1f66c7d83..5e48f6419 100644 --- a/lib/Doctrine/ORM/Query/Parser/CollectionValuedAssociationField.php +++ b/lib/Doctrine/ORM/Query/Parser/CollectionValuedAssociationField.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * CollectionValuedAssociationField ::= FieldIdentificationVariable * @@ -29,5 +31,6 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_CollectionValuedAssociationField extends Doctrine_ORM_Query_Parser_FieldIdentificationVariable -{ } \ No newline at end of file +class CollectionValuedAssociationField extends FieldIdentificationVariable +{ +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/Parser/DeleteStatement.php b/lib/Doctrine/ORM/Query/Parser/DeleteStatement.php index a37ecc2dd..2d64e4038 100644 --- a/lib/Doctrine/ORM/Query/Parser/DeleteStatement.php +++ b/lib/Doctrine/ORM/Query/Parser/DeleteStatement.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * DeleteStatement ::= DeleteClause [WhereClause] * @@ -29,7 +31,7 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_DeleteStatement extends Doctrine_ORM_Query_ParserRule +class DeleteStatement extends \Doctrine\ORM\Query\ParserRule { public function syntax() { @@ -38,7 +40,7 @@ class Doctrine_ORM_Query_Parser_DeleteStatement extends Doctrine_ORM_Query_Parse $AST->setDeleteClause($this->parse('DeleteClause')); - if ($this->_isNextToken(Doctrine_ORM_Query_Token::T_WHERE)) { + if ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_WHERE)) { $AST->setWhereClause($this->parse('WhereClause')); } diff --git a/lib/Doctrine/ORM/Query/Parser/EmbeddedClassStateField.php b/lib/Doctrine/ORM/Query/Parser/EmbeddedClassStateField.php index d033c7a4c..8a423229f 100644 --- a/lib/Doctrine/ORM/Query/Parser/EmbeddedClassStateField.php +++ b/lib/Doctrine/ORM/Query/Parser/EmbeddedClassStateField.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * EmbeddedClassStateField ::= FieldIdentificationVariable * @@ -29,5 +31,6 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_EmbeddedClassStateField extends Doctrine_ORM_Query_Parser_FieldIdentificationVariable -{ } \ No newline at end of file +class EmbeddedClassStateField extends FieldIdentificationVariable +{ +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/Parser/Exception.php b/lib/Doctrine/ORM/Query/Parser/Exception.php deleted file mode 100644 index a760fd4b6..000000000 --- a/lib/Doctrine/ORM/Query/Parser/Exception.php +++ /dev/null @@ -1,35 +0,0 @@ -. - */ - -/** - * Doctrine_ORM_Query_Parser_Exception - * - * @package Doctrine - * @subpackage Query - * @author Janne Vanhala - * @license http://www.opensource.org/licenses/lgpl-license.php LGPL - * @link http://www.phpdoctrine.org - * @since 1.0 - * @version $Revision$ - */ -class Doctrine_ORM_Query_Parser_Exception extends Doctrine_ORM_Query_Exception -{ -} diff --git a/lib/Doctrine/ORM/Query/Parser/FieldAliasIdentificationVariable.php b/lib/Doctrine/ORM/Query/Parser/FieldAliasIdentificationVariable.php index 6804d30ea..4600e3097 100644 --- a/lib/Doctrine/ORM/Query/Parser/FieldAliasIdentificationVariable.php +++ b/lib/Doctrine/ORM/Query/Parser/FieldAliasIdentificationVariable.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * FieldAliasIdentificationVariable ::= identifier * @@ -29,7 +31,7 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_FieldAliasIdentificationVariable extends Doctrine_ORM_Query_Parser +class FieldAliasIdentificationVariable extends \Doctrine\ORM\Query\Parser { protected $_fieldAlias = null; @@ -37,7 +39,7 @@ class Doctrine_ORM_Query_Parser_FieldAliasIdentificationVariable extends Doctrin public function syntax() { // AliasIdentificationVariable = identifier - $this->_parser->match(Doctrine_ORM_Query_Token::T_IDENTIFIER); + $this->_parser->match(\Doctrine\ORM\Query\Token::T_IDENTIFIER); $this->_fieldAlias = $this->_parser->token['value']; } diff --git a/lib/Doctrine/ORM/Query/Parser/FieldIdentificationVariable.php b/lib/Doctrine/ORM/Query/Parser/FieldIdentificationVariable.php index d25acff40..6cbbc1e2e 100644 --- a/lib/Doctrine/ORM/Query/Parser/FieldIdentificationVariable.php +++ b/lib/Doctrine/ORM/Query/Parser/FieldIdentificationVariable.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * FieldIdentificationVariable ::= identifier * @@ -29,11 +31,11 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_FieldIdentificationVariable extends Doctrine_ORM_Query_ParserRule +class FieldIdentificationVariable extends \Doctrine\ORM\Query\ParserRule { public function syntax() { - $this->_parser->match(Doctrine_ORM_Query_Token::T_IDENTIFIER); + $this->_parser->match(\Doctrine\ORM\Query\Token::T_IDENTIFIER); return $this->_parser->token['value']; } diff --git a/lib/Doctrine/ORM/Query/Parser/FromClause.php b/lib/Doctrine/ORM/Query/Parser/FromClause.php index 62e273e84..053d91a27 100644 --- a/lib/Doctrine/ORM/Query/Parser/FromClause.php +++ b/lib/Doctrine/ORM/Query/Parser/FromClause.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * FromClause ::= "FROM" IdentificationVariableDeclaration {"," IdentificationVariableDeclaration} * @@ -29,17 +31,16 @@ * @since 1.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_FromClause extends Doctrine_ORM_Query_ParserRule +class FromClause extends \Doctrine\ORM\Query\ParserRule { protected $_AST = null; - public function syntax() { // FromClause ::= "FROM" IdentificationVariableDeclaration {"," IdentificationVariableDeclaration} $this->_AST = $this->AST('FromClause'); - $this->_parser->match(Doctrine_ORM_Query_Token::T_FROM); + $this->_parser->match(\Doctrine\ORM\Query\Token::T_FROM); $this->_AST->addIdentificationVariableDeclaration( $this->parse('IdentificationVariableDeclaration') diff --git a/lib/Doctrine/ORM/Query/Parser/IdentificationVariable.php b/lib/Doctrine/ORM/Query/Parser/IdentificationVariable.php index 4568dbeab..422421957 100644 --- a/lib/Doctrine/ORM/Query/Parser/IdentificationVariable.php +++ b/lib/Doctrine/ORM/Query/Parser/IdentificationVariable.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * IdentificationVariable ::= identifier * @@ -29,11 +31,10 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_IdentificationVariable extends Doctrine_ORM_Query_ParserRule +class IdentificationVariable extends \Doctrine\ORM\Query\ParserRule { protected $_componentAlias = null; - public function syntax() { // IdentificationVariable ::= identifier @@ -41,7 +42,6 @@ class Doctrine_ORM_Query_Parser_IdentificationVariable extends Doctrine_ORM_Quer $this->_componentAlias = $this->_parser->token['value']; } - public function semantical() { $parserResult = $this->_parser->getParserResult(); @@ -57,4 +57,4 @@ class Doctrine_ORM_Query_Parser_IdentificationVariable extends Doctrine_ORM_Quer // Return Component Alias identifier return $this->_componentAlias; } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/Parser/IdentificationVariableDeclaration.php b/lib/Doctrine/ORM/Query/Parser/IdentificationVariableDeclaration.php index b000e7f4d..5b7d5b128 100644 --- a/lib/Doctrine/ORM/Query/Parser/IdentificationVariableDeclaration.php +++ b/lib/Doctrine/ORM/Query/Parser/IdentificationVariableDeclaration.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * IdentificationVariableDeclaration ::= RangeVariableDeclaration [IndexBy] {JoinVariableDeclaration}* * @@ -29,7 +31,7 @@ * @since 1.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_IdentificationVariableDeclaration extends Doctrine_ORM_Query_ParserRule +class IdentificationVariableDeclaration extends \Doctrine\ORM\Query\ParserRule { protected $_AST = null; @@ -41,14 +43,14 @@ class Doctrine_ORM_Query_Parser_IdentificationVariableDeclaration extends Doctri $this->_AST->setRangeVariableDeclaration($this->parse('RangeVariableDeclaration')); - if ($this->_isNextToken(Doctrine_ORM_Query_Token::T_INDEX)) { + if ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_INDEX)) { $this->_AST->setIndexBy($this->parse('IndexBy')); } while ( - $this->_isNextToken(Doctrine_ORM_Query_Token::T_LEFT) || - $this->_isNextToken(Doctrine_ORM_Query_Token::T_INNER) || - $this->_isNextToken(Doctrine_ORM_Query_Token::T_JOIN) + $this->_isNextToken(\Doctrine\ORM\Query\Token::T_LEFT) || + $this->_isNextToken(\Doctrine\ORM\Query\Token::T_INNER) || + $this->_isNextToken(\Doctrine\ORM\Query\Token::T_JOIN) ) { $this->_AST->addJoinVariableDeclaration($this->parse('JoinVariableDeclaration')); } diff --git a/lib/Doctrine/ORM/Query/Parser/IndexBy.php b/lib/Doctrine/ORM/Query/Parser/IndexBy.php index 2e1c233b8..0c72b795a 100644 --- a/lib/Doctrine/ORM/Query/Parser/IndexBy.php +++ b/lib/Doctrine/ORM/Query/Parser/IndexBy.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * IndexBy ::= "INDEX" "BY" SimpleStateFieldPathExpression * @@ -29,23 +31,21 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_IndexBy extends Doctrine_ORM_Query_ParserRule +class IndexBy extends \Doctrine\ORM\Query\ParserRule { protected $_AST = null; - public function syntax() { // IndexBy ::= "INDEX" "BY" SimpleStateFieldPathExpression $this->_AST = $this->AST('IndexBy'); - $this->_parser->match(Doctrine_ORM_Query_Token::T_INDEX); - $this->_parser->match(Doctrine_ORM_Query_Token::T_BY); + $this->_parser->match(\Doctrine\ORM\Query\Token::T_INDEX); + $this->_parser->match(\Doctrine\ORM\Query\Token::T_BY); $this->_AST->setSimpleStateFieldPathExpression($this->parse('SimpleStateFieldPathExpression')); } - public function semantical() { // Retrieving required information diff --git a/lib/Doctrine/ORM/Query/Parser/Join.php b/lib/Doctrine/ORM/Query/Parser/Join.php index a3d8b227a..b87a1b8f6 100644 --- a/lib/Doctrine/ORM/Query/Parser/Join.php +++ b/lib/Doctrine/ORM/Query/Parser/Join.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * Join ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" JoinAssociationPathExpression * ["AS"] AliasIdentificationVariable [("ON" | "WITH") ConditionalExpression] @@ -29,11 +31,10 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_Join extends Doctrine_ORM_Query_ParserRule +class Join extends \Doctrine\ORM\Query\ParserRule { protected $_AST = null; - public function syntax() { // Join ::= ["LEFT" ["OUTER"] | "INNER"] "JOIN" JoinAssociationPathExpression @@ -41,45 +42,45 @@ class Doctrine_ORM_Query_Parser_Join extends Doctrine_ORM_Query_ParserRule $this->_AST = $this->AST('Join'); // Check Join type - if ($this->_isNextToken(Doctrine_ORM_Query_Token::T_LEFT)) { - $this->_parser->match(Doctrine_ORM_Query_Token::T_LEFT); + if ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_LEFT)) { + $this->_parser->match(\Doctrine\ORM\Query\Token::T_LEFT); // Possible LEFT OUTER join - if ($this->_isNextToken(Doctrine_ORM_Query_Token::T_OUTER)) { - $this->_parser->match(Doctrine_ORM_Query_Token::T_OUTER); + if ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_OUTER)) { + $this->_parser->match(\Doctrine\ORM\Query\Token::T_OUTER); $this->_AST->setJoinType(Doctrine_ORM_Query_AST_Join::JOIN_TYPE_LEFTOUTER); } else { $this->_AST->setJoinType(Doctrine_ORM_Query_AST_Join::JOIN_TYPE_LEFT); } - } else if ($this->_isNextToken(Doctrine_ORM_Query_Token::T_INNER)) { + } else if ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_INNER)) { // Default Join type. Not need to setJoinType. - $this->_parser->match(Doctrine_ORM_Query_Token::T_INNER); + $this->_parser->match(\Doctrine\ORM\Query\Token::T_INNER); } - $this->_parser->match(Doctrine_ORM_Query_Token::T_JOIN); + $this->_parser->match(\Doctrine\ORM\Query\Token::T_JOIN); $this->_AST->setJoinAssociationPathExpression($this->parse('JoinAssociationPathExpression')); - if ($this->_isNextToken(Doctrine_ORM_Query_Token::T_AS)) { - $this->_parser->match(Doctrine_ORM_Query_Token::T_AS); + if ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_AS)) { + $this->_parser->match(\Doctrine\ORM\Query\Token::T_AS); } $this->_AST->setAliasIdentificationVariable($this->parse('AliasIdentificationVariable')); // Check Join where type if ( - $this->_isNextToken(Doctrine_ORM_Query_Token::T_ON) || - $this->_isNextToken(Doctrine_ORM_Query_Token::T_WITH) + $this->_isNextToken(\Doctrine\ORM\Query\Token::T_ON) || + $this->_isNextToken(\Doctrine\ORM\Query\Token::T_WITH) ) { // Apply matches and adjusts - if ($this->_isNextToken(Doctrine_ORM_Query_Token::T_ON)) { - $this->_parser->match(Doctrine_ORM_Query_Token::T_ON); + if ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_ON)) { + $this->_parser->match(\Doctrine\ORM\Query\Token::T_ON); $this->_AST->setWhereType(Doctrine_ORM_Query_AST_Join::JOIN_WHERE_ON); } else { // Default Join where type. Not need to setWhereType. - $this->_parser->match(Doctrine_ORM_Query_Token::T_WITH); + $this->_parser->match(\Doctrine\ORM\Query\Token::T_WITH); } $this->_AST->setConditionalExpression($this->parse('ConditionalExpression')); diff --git a/lib/Doctrine/ORM/Query/Parser/JoinAssociationPathExpression.php b/lib/Doctrine/ORM/Query/Parser/JoinAssociationPathExpression.php index d1552fd2d..bd0b718e0 100644 --- a/lib/Doctrine/ORM/Query/Parser/JoinAssociationPathExpression.php +++ b/lib/Doctrine/ORM/Query/Parser/JoinAssociationPathExpression.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * JoinAssociationPathExpression ::= JoinCollectionValuedPathExpression | JoinSingleValuedAssociationPathExpression * @@ -29,7 +31,7 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_JoinAssociationPathExpression extends Doctrine_ORM_Query_ParserRule +class JoinAssociationPathExpression extends \Doctrine\ORM\Query\ParserRule { public function syntax() { @@ -40,7 +42,6 @@ class Doctrine_ORM_Query_Parser_JoinAssociationPathExpression extends Doctrine_O ); } - private function _isSingleValuedPathExpression() { $parserResult = $this->_parser->getParserResult(); @@ -55,7 +56,7 @@ class Doctrine_ORM_Query_Parser_JoinAssociationPathExpression extends Doctrine_O $token = $this->_parser->getScanner()->peek(); // If we have a dot ".", then next char must be the "*" - if ($token['type'] === Doctrine_ORM_Query_Token::T_DOT) { + if ($token['type'] === \Doctrine\ORM\Query\Token::T_DOT) { $token = $this->_parser->getScanner()->peek(); if ( ! ($queryComponent['metadata']->hasAssociation($token['value']) && @@ -67,4 +68,4 @@ class Doctrine_ORM_Query_Parser_JoinAssociationPathExpression extends Doctrine_O return false; } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/Parser/JoinCollectionValuedPathExpression.php b/lib/Doctrine/ORM/Query/Parser/JoinCollectionValuedPathExpression.php index 7dd387ef0..25567c92c 100644 --- a/lib/Doctrine/ORM/Query/Parser/JoinCollectionValuedPathExpression.php +++ b/lib/Doctrine/ORM/Query/Parser/JoinCollectionValuedPathExpression.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * JoinCollectionValuedPathExpression ::= IdentificationVariable "." CollectionValuedAssociationField * @@ -29,22 +31,20 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_JoinCollectionValuedPathExpression extends Doctrine_ORM_Query_ParserRule +class JoinCollectionValuedPathExpression extends \Doctrine\ORM\Query\ParserRule { protected $_AST = null; - public function syntax() { // JoinCollectionValuedPathExpression ::= IdentificationVariable "." CollectionValuedAssociationField $this->_AST = $this->AST('JoinCollectionValuedPathExpression'); $this->_AST->setIdentificationVariable($this->parse('IdentificationVariable')); - $this->_parser->match(Doctrine_ORM_Query_Token::T_DOT); + $this->_parser->match(\Doctrine\ORM\Query\Token::T_DOT); $this->_AST->setCollectionValuedAssociationField($this->parse('CollectionValuedAssociationField')); } - public function semantical() { $parserResult = $this->_parser->getParserResult(); @@ -71,4 +71,4 @@ class Doctrine_ORM_Query_Parser_JoinCollectionValuedPathExpression extends Doctr return $this->_AST; } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/Parser/JoinSingleValuedAssociationPathExpression.php b/lib/Doctrine/ORM/Query/Parser/JoinSingleValuedAssociationPathExpression.php index e0262267a..213b4679d 100644 --- a/lib/Doctrine/ORM/Query/Parser/JoinSingleValuedAssociationPathExpression.php +++ b/lib/Doctrine/ORM/Query/Parser/JoinSingleValuedAssociationPathExpression.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * JoinSingleValuedAssociationPathExpression ::= IdentificationVariable "." SingleValuedAssociationField * @@ -29,22 +31,20 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_JoinSingleValuedAssociationPathExpression extends Doctrine_ORM_Query_ParserRule +class JoinSingleValuedAssociationPathExpression extends \Doctrine\ORM\Query\ParserRule { protected $_AST = null; - public function syntax() { // JoinSingleValuedAssociationPathExpression ::= IdentificationVariable "." SingleValuedAssociationField $this->_AST = $this->AST('JoinSingleValuedAssociationPathExpression'); $this->_AST->setIdentificationVariable($this->parse('IdentificationVariable')); - $this->_parser->match(Doctrine_ORM_Query_Token::T_DOT); + $this->_parser->match(\Doctrine\ORM\Query\Token::T_DOT); $this->_AST->setSingleValuedAssociationField($this->parse('SingleValuedAssociationField')); } - public function semantical() { $parserResult = $this->_parser->getParserResult(); diff --git a/lib/Doctrine/ORM/Query/Parser/JoinVariableDeclaration.php b/lib/Doctrine/ORM/Query/Parser/JoinVariableDeclaration.php index 38eef8723..30a1d35b0 100644 --- a/lib/Doctrine/ORM/Query/Parser/JoinVariableDeclaration.php +++ b/lib/Doctrine/ORM/Query/Parser/JoinVariableDeclaration.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * JoinVariableDeclaration ::= Join [IndexBy] * @@ -29,11 +31,10 @@ * @since 1.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_JoinVariableDeclaration extends Doctrine_ORM_Query_ParserRule +class JoinVariableDeclaration extends \Doctrine\ORM\Query\ParserRule { protected $_AST = null; - public function syntax() { // JoinVariableDeclaration ::= Join [IndexBy] @@ -41,12 +42,11 @@ class Doctrine_ORM_Query_Parser_JoinVariableDeclaration extends Doctrine_ORM_Que $this->_AST->setJoin($this->parse('Join')); - if ($this->_isNextToken(Doctrine_ORM_Query_Token::T_INDEX)) { + if ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_INDEX)) { $this->_AST->setIndexBy($this->parse('IndexBy')); } } - public function semantical() { // If we have an INDEX BY JoinVariableDeclaration diff --git a/lib/Doctrine/ORM/Query/Parser/QueryLanguage.php b/lib/Doctrine/ORM/Query/Parser/QueryLanguage.php index c1312a456..f4a806744 100644 --- a/lib/Doctrine/ORM/Query/Parser/QueryLanguage.php +++ b/lib/Doctrine/ORM/Query/Parser/QueryLanguage.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * QueryLanguage ::= SelectStatement | UpdateStatement | DeleteStatement * @@ -31,21 +33,21 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_QueryLanguage extends Doctrine_ORM_Query_ParserRule +class QueryLanguage extends \Doctrine\ORM\Query\ParserRule { public function syntax() { // QueryLanguage ::= SelectStatement | UpdateStatement | DeleteStatement switch ($this->_parser->lookahead['type']) { - case Doctrine_ORM_Query_Token::T_SELECT: + case \Doctrine\ORM\Query\Token::T_SELECT: return $this->parse('SelectStatement'); break; - case Doctrine_ORM_Query_Token::T_UPDATE: + case \Doctrine\ORM\Query\Token::T_UPDATE: return $this->parse('UpdateStatement'); break; - case Doctrine_ORM_Query_Token::T_DELETE: + case \Doctrine\ORM\Query\Token::T_DELETE: return $this->parse('DeleteStatement'); break; diff --git a/lib/Doctrine/ORM/Query/Parser/RangeVariableDeclaration.php b/lib/Doctrine/ORM/Query/Parser/RangeVariableDeclaration.php index 3545db7d9..7ef810ef4 100644 --- a/lib/Doctrine/ORM/Query/Parser/RangeVariableDeclaration.php +++ b/lib/Doctrine/ORM/Query/Parser/RangeVariableDeclaration.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable * @@ -29,11 +31,10 @@ * @since 1.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_RangeVariableDeclaration extends Doctrine_ORM_Query_ParserRule +class RangeVariableDeclaration extends \Doctrine\ORM\Query\ParserRule { protected $_AST = null; - public function syntax() { // RangeVariableDeclaration ::= AbstractSchemaName ["AS"] AliasIdentificationVariable @@ -41,14 +42,13 @@ class Doctrine_ORM_Query_Parser_RangeVariableDeclaration extends Doctrine_ORM_Qu $this->_AST->setAbstractSchemaName($this->parse('AbstractSchemaName')); - if ($this->_isNextToken(Doctrine_ORM_Query_Token::T_AS)) { - $this->_parser->match(Doctrine_ORM_Query_Token::T_AS); + if ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_AS)) { + $this->_parser->match(\Doctrine\ORM\Query\Token::T_AS); } $this->_AST->setAliasIdentificationVariable($this->parse('AliasIdentificationVariable')); } - public function semantical() { $parserResult = $this->_parser->getParserResult(); diff --git a/lib/Doctrine/ORM/Query/Parser/SelectClause.php b/lib/Doctrine/ORM/Query/Parser/SelectClause.php index d0007bc93..dbf41829d 100644 --- a/lib/Doctrine/ORM/Query/Parser/SelectClause.php +++ b/lib/Doctrine/ORM/Query/Parser/SelectClause.php @@ -32,20 +32,18 @@ class Doctrine_ORM_Query_Parser_SelectClause extends Doctrine_ORM_Query_ParserRule { protected $_AST = null; - protected $_selectExpressions = array(); - public function syntax() { // SelectClause ::= "SELECT" ["DISTINCT"] SelectExpression {"," SelectExpression} $this->_AST = $this->AST('SelectClause'); - $this->_parser->match(Doctrine_ORM_Query_Token::T_SELECT); + $this->_parser->match(\Doctrine\ORM\Query\Token::T_SELECT); // Inspecting if we are in a DISTINCT query - if ($this->_isNextToken(Doctrine_ORM_Query_Token::T_DISTINCT)) { - $this->_parser->match(Doctrine_ORM_Query_Token::T_DISTINCT); + if ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_DISTINCT)) { + $this->_parser->match(\Doctrine\ORM\Query\Token::T_DISTINCT); $this->_AST->setIsDistinct(true); } @@ -53,14 +51,13 @@ class Doctrine_ORM_Query_Parser_SelectClause extends Doctrine_ORM_Query_ParserRu // Process SelectExpressions (1..N) $this->_selectExpressions[] = $this->parse('SelectExpression'); - while ($this->_isNextToken(Doctrine_ORM_Query_Token::T_COMMA)) { - $this->_parser->match(Doctrine_ORM_Query_Token::T_COMMA); + while ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_COMMA)) { + $this->_parser->match(\Doctrine\ORM\Query\Token::T_COMMA); $this->_selectExpressions[] = $this->parse('SelectExpression'); } } - public function semantical() { // We need to validate each SelectExpression @@ -71,4 +68,4 @@ class Doctrine_ORM_Query_Parser_SelectClause extends Doctrine_ORM_Query_ParserRu // Return AST node return $this->_AST; } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/Parser/SelectExpression.php b/lib/Doctrine/ORM/Query/Parser/SelectExpression.php index ae944d006..491146406 100644 --- a/lib/Doctrine/ORM/Query/Parser/SelectExpression.php +++ b/lib/Doctrine/ORM/Query/Parser/SelectExpression.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * SelectExpression ::= IdentificationVariable ["." "*"] | StateFieldPathExpression | * (AggregateExpression | "(" Subselect ")") [["AS"] FieldAliasIdentificationVariable] @@ -30,15 +32,12 @@ * @since 1.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_SelectExpression extends Doctrine_ORM_Query_ParserRule +class SelectExpression extends \Doctrine\ORM\Query\ParserRule { protected $_AST = null; - protected $_expression = null; - protected $_fieldIdentificationVariable = null; - public function syntax() { // SelectExpression ::= IdentificationVariable ["." "*"] | StateFieldPathExpression | @@ -57,11 +56,11 @@ class Doctrine_ORM_Query_Parser_SelectExpression extends Doctrine_ORM_Query_Pars } else if (($isFunction = $this->_isFunction()) !== false || $this->_isSubselect()) { $this->_expression = $this->parse($isFunction ? 'AggregateExpression' : 'Subselect'); - if ($this->_isNextToken(Doctrine_ORM_Query_Token::T_AS)) { - $this->_parser->match(Doctrine_ORM_Query_Token::T_AS); + if ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_AS)) { + $this->_parser->match(\Doctrine\ORM\Query\Token::T_AS); $this->_fieldIdentificationVariable = $this->parse('FieldAliasIdentificationVariable'); - } elseif ($this->_isNextToken(Doctrine_ORM_Query_Token::T_IDENTIFIER)) { + } elseif ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_IDENTIFIER)) { $this->_fieldIdentificationVariable = $this->parse('FieldAliasIdentificationVariable'); } } else { @@ -69,7 +68,6 @@ class Doctrine_ORM_Query_Parser_SelectExpression extends Doctrine_ORM_Query_Pars } } - public function semantical() { $this->_AST->setExpression($this->_expression->semantical()); @@ -82,7 +80,6 @@ class Doctrine_ORM_Query_Parser_SelectExpression extends Doctrine_ORM_Query_Pars return $this->_AST; } - protected function _isIdentificationVariable() { // Trying to recoginize this grammar: IdentificationVariable ["." "*"] @@ -90,7 +87,7 @@ class Doctrine_ORM_Query_Parser_SelectExpression extends Doctrine_ORM_Query_Pars $this->_parser->getScanner()->resetPeek(); // We have an identifier here - if ($token['type'] === Doctrine_ORM_Query_Token::T_IDENTIFIER) { + if ($token['type'] === \Doctrine\ORM\Query\Token::T_IDENTIFIER) { return true; } diff --git a/lib/Doctrine/ORM/Query/Parser/SelectStatement.php b/lib/Doctrine/ORM/Query/Parser/SelectStatement.php index 2b1dff3fb..62b0ec66c 100644 --- a/lib/Doctrine/ORM/Query/Parser/SelectStatement.php +++ b/lib/Doctrine/ORM/Query/Parser/SelectStatement.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * SelectStatement ::= SelectClause FromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause] * @@ -29,13 +31,11 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_SelectStatement extends Doctrine_ORM_Query_ParserRule +class SelectStatement extends \Doctrine\ORM\Query\ParserRule { protected $_AST = null; - protected $_selectClause = null; - public function syntax() { // SelectStatement ::= SelectClause FromClause [WhereClause] [GroupByClause] [HavingClause] [OrderByClause] @@ -50,24 +50,23 @@ class Doctrine_ORM_Query_Parser_SelectStatement extends Doctrine_ORM_Query_Parse $this->_AST->setFromClause($this->parse('FromClause')); - if ($this->_isNextToken(Doctrine_ORM_Query_Token::T_WHERE)) { + if ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_WHERE)) { $this->_AST->setWhereClause($this->parse('WhereClause')); } - if ($this->_isNextToken(Doctrine_ORM_Query_Token::T_GROUP)) { + if ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_GROUP)) { $this->_AST->setGroupByClause($this->parse('GroupByClause')); } - if ($this->_isNextToken(Doctrine_ORM_Query_Token::T_HAVING)) { + if ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_HAVING)) { $this->_AST->setHavingClause($this->parse('HavingClause')); } - if ($this->_isNextToken(Doctrine_ORM_Query_Token::T_ORDER)) { + if ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_ORDER)) { $this->_AST->setOrderByClause($this->parse('OrderByClause')); } } - public function semantical() { // We need to invoke the semantical check of SelectClause here, since diff --git a/lib/Doctrine/ORM/Query/Parser/SimpleStateField.php b/lib/Doctrine/ORM/Query/Parser/SimpleStateField.php index 7e0631647..b76457f07 100644 --- a/lib/Doctrine/ORM/Query/Parser/SimpleStateField.php +++ b/lib/Doctrine/ORM/Query/Parser/SimpleStateField.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * SimpleStateField ::= FieldIdentificationVariable * @@ -29,5 +31,6 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_SimpleStateField extends Doctrine_ORM_Query_Parser_FieldIdentificationVariable -{ } \ No newline at end of file +class SimpleStateField extends \Doctrine\ORM\Query\Parser\FieldIdentificationVariable +{ +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/Parser/SimpleStateFieldPathExpression.php b/lib/Doctrine/ORM/Query/Parser/SimpleStateFieldPathExpression.php index 05eaf020a..5d346449d 100644 --- a/lib/Doctrine/ORM/Query/Parser/SimpleStateFieldPathExpression.php +++ b/lib/Doctrine/ORM/Query/Parser/SimpleStateFieldPathExpression.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * SimpleStateFieldPathExpression ::= IdentificationVariable "." SimpleStateField * @@ -29,11 +31,10 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_SimpleStateFieldPathExpression extends Doctrine_ORM_Query_ParserRule +class SimpleStateFieldPathExpression extends \Doctrine\ORM\Query\ParserRule { protected $_AST = null; - - + public function syntax() { // SimpleStateFieldPathExpression ::= IdentificationVariable "." SimpleStateField @@ -46,7 +47,6 @@ class Doctrine_ORM_Query_Parser_SimpleStateFieldPathExpression extends Doctrine_ $this->_AST->setSimpleStateField($this->parse('SimpleStateField')); } - public function semantical() { $parserResult = $this->_parser->getParserResult(); @@ -63,7 +63,7 @@ class Doctrine_ORM_Query_Parser_SimpleStateFieldPathExpression extends Doctrine_ return; } - if ($classMetadata instanceof Doctrine_ClassMetadata && ! $classMetadata->hasField($componentFieldName)) { + if ($classMetadata instanceof \Doctrine\ORM\Mapping\ClassMetadata && ! $classMetadata->hasField($componentFieldName)) { $this->_parser->semanticalError( "Cannot use key mapping. Field '" . $componentFieldName . "' " . "does not exist in component '" . $classMetadata->getClassName() . "'.", diff --git a/lib/Doctrine/ORM/Query/Parser/SingleValuedAssociationField.php b/lib/Doctrine/ORM/Query/Parser/SingleValuedAssociationField.php index 021188802..8a7a46af5 100644 --- a/lib/Doctrine/ORM/Query/Parser/SingleValuedAssociationField.php +++ b/lib/Doctrine/ORM/Query/Parser/SingleValuedAssociationField.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * SingleValuedAssociationField ::= FieldIdentificationVariable * @@ -29,5 +31,6 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_SingleValuedAssociationField extends Doctrine_ORM_Query_Parser_FieldIdentificationVariable -{ } \ No newline at end of file +class SingleValuedAssociationField extends \Doctrine\ORM\Query\Parser\FieldIdentificationVariable +{ +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/Parser/StateField.php b/lib/Doctrine/ORM/Query/Parser/StateField.php index 4f3a57387..8596e740a 100644 --- a/lib/Doctrine/ORM/Query/Parser/StateField.php +++ b/lib/Doctrine/ORM/Query/Parser/StateField.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * StateField ::= {EmbeddedClassStateField "."}* SimpleStateField * @@ -29,20 +31,19 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_StateField extends Doctrine_ORM_Query_ParserRule +class StateField extends \Doctrine\ORM\Query\ParserRule { protected $_AST = null; - public function syntax() { // StateField ::= {EmbeddedClassStateField "."}* SimpleStateField $this->_AST = $this->AST('StateField'); - while ($this->_parser->lookahead['type'] == Doctrine_ORM_Query_Token::T_IDENTIFIER && - $this->_isNextToken(Doctrine_ORM_Query_Token::T_DOT)) { + while ($this->_parser->lookahead['type'] == \Doctrine\ORM\Query\Token::T_IDENTIFIER && + $this->_isNextToken(\Doctrine\ORM\Query\Token::T_DOT)) { $this->_AST->addEmbeddedClassStateField($this->parse('EmbeddedClassStateField')); - $this->_parser->match(Doctrine_ORM_Query_Token::T_DOT); + $this->_parser->match(\Doctrine\ORM\Query\Token::T_DOT); } $this->_AST->setSimpleStateField($this->parse('SimpleStateField')); diff --git a/lib/Doctrine/ORM/Query/Parser/UpdateStatement.php b/lib/Doctrine/ORM/Query/Parser/UpdateStatement.php index f6a74dcea..069bcb207 100644 --- a/lib/Doctrine/ORM/Query/Parser/UpdateStatement.php +++ b/lib/Doctrine/ORM/Query/Parser/UpdateStatement.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query\Parser; + /** * UpdateStatement ::= UpdateClause [WhereClause] * @@ -29,7 +31,7 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Parser_UpdateStatement extends Doctrine_ORM_Query_ParserRule +class UpdateStatement extends \Doctrine\ORM\Query\ParserRule { public function syntax() { @@ -38,11 +40,11 @@ class Doctrine_ORM_Query_Parser_UpdateStatement extends Doctrine_ORM_Query_Parse $AST->setUpdateClause($this->parse('UpdateClause')); - if ($this->_isNextToken(Doctrine_ORM_Query_Token::T_WHERE)) { + if ($this->_isNextToken(\Doctrine\ORM\Query\Token::T_WHERE)) { $AST->setWhereClause($this->parse('WhereClause')); } // Return AST node return $AST; } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/ParserDataHolder.php b/lib/Doctrine/ORM/Query/ParserDataHolder.php index 6eb80b71c..b835c86ee 100644 --- a/lib/Doctrine/ORM/Query/ParserDataHolder.php +++ b/lib/Doctrine/ORM/Query/ParserDataHolder.php @@ -33,16 +33,13 @@ class Doctrine_ORM_Query_ParserDataHolder { protected static $_instance; - protected $_data; - protected function __construct() { $this->free(); } - public static function create() { if ( ! isset(self::$_instance)) { @@ -52,31 +49,26 @@ class Doctrine_ORM_Query_ParserDataHolder return self::$_instance; } - public function free() { $this->_data = array(); } - public function set($offset, $value) { $this->_data[$offset] = $value; } - public function get($offset) { return isset($this->_data[$offset]) ? $this->_data[$offset] : null; } - public function has($offset) { return isset($this->_data[$offset]); } - public function remove($offset) { if ($this->has($offset)) { @@ -84,4 +76,4 @@ class Doctrine_ORM_Query_ParserDataHolder unset($this->_data[$offset]); } } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/ParserResult.php b/lib/Doctrine/ORM/Query/ParserResult.php index a2b052fa1..66b21e100 100644 --- a/lib/Doctrine/ORM/Query/ParserResult.php +++ b/lib/Doctrine/ORM/Query/ParserResult.php @@ -47,7 +47,6 @@ class ParserResult extends AbstractResult */ protected $_queryFields = array(); - /** * Sets the Entity Manager. * @@ -58,7 +57,6 @@ class ParserResult extends AbstractResult $this->_em = $em; } - /** * Gets the Entity Manager. * @@ -69,7 +67,6 @@ class ParserResult extends AbstractResult return $this->_em; } - /** * @nodoc */ @@ -78,7 +75,6 @@ class ParserResult extends AbstractResult $this->_data = $executor; } - /** * @nodoc */ @@ -87,7 +83,6 @@ class ParserResult extends AbstractResult return $this->_data; } - /** * Defines the mapping fields. * @@ -98,7 +93,6 @@ class ParserResult extends AbstractResult $this->_queryFields = $queryFields; } - /** * Sets the declaration for given field alias. * @@ -110,7 +104,6 @@ class ParserResult extends AbstractResult $this->_queryFields[$fieldAlias] = $queryField; } - /** * Gets the mapping fields. * @@ -121,7 +114,6 @@ class ParserResult extends AbstractResult return $this->_queryFields; } - /** * Get the declaration for given field alias. * @@ -137,7 +129,6 @@ class ParserResult extends AbstractResult return $this->_queryFields[$fieldAlias]; } - /** * Whether or not this object has a declaration for given field alias. * @@ -148,4 +139,4 @@ class ParserResult extends AbstractResult { return isset($this->_queryFields[$fieldAlias]); } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/ParserResultDummy.php b/lib/Doctrine/ORM/Query/ParserResultDummy.php index 3261252de..736b77095 100644 --- a/lib/Doctrine/ORM/Query/ParserResultDummy.php +++ b/lib/Doctrine/ORM/Query/ParserResultDummy.php @@ -16,7 +16,6 @@ class ParserResultDummy private $_tableToClassAliasMap; private $_queryComponents; - public function isMixedQuery() { return $this->_isMixedQuery; @@ -76,7 +75,4 @@ class ParserResultDummy { return $this->_queryComponents; } -} - - -?> \ No newline at end of file +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/ParserRule.php b/lib/Doctrine/ORM/Query/ParserRule.php index 31cef97f5..6110b893b 100644 --- a/lib/Doctrine/ORM/Query/ParserRule.php +++ b/lib/Doctrine/ORM/Query/ParserRule.php @@ -39,13 +39,11 @@ abstract class ParserRule */ const SQLALIAS_SEPARATOR = '__'; - /** * @nodoc */ const DEFAULT_QUERYCOMPONENT = 'dctrn'; - /** * Parser object * @@ -67,7 +65,6 @@ abstract class ParserRule */ protected $_dataHolder; - /** * Creates a new production object. * @@ -80,14 +77,12 @@ abstract class ParserRule $this->_dataHolder = Doctrine_ORM_Query_ParserDataHolder::create(); } - protected function _isNextToken($token) { $la = $this->_parser->lookahead; return ($la['type'] === $token || $la['value'] === $token); } - protected function _isFunction() { $la = $this->_parser->lookahead; @@ -95,7 +90,6 @@ abstract class ParserRule return ($la['type'] === Doctrine_ORM_Query_Token::T_IDENTIFIER && $next['value'] === '('); } - protected function _isSubselect() { $la = $this->_parser->lookahead; @@ -103,7 +97,6 @@ abstract class ParserRule return ($la['value'] === '(' && $next['type'] === Doctrine_ORM_Query_Token::T_SELECT); } - /** * Executes the grammar rule using the specified parameters. * @@ -142,7 +135,6 @@ abstract class ParserRule return $BNFGrammarRule; } - /** * Returns a grammar rule object with the given name. * @@ -164,8 +156,7 @@ abstract class ParserRule return new $class($this->_parser); } - - + /** * Creates an AST node with the given name. * @@ -183,7 +174,6 @@ abstract class ParserRule */ abstract public function syntax(); - /** * @nodoc */ @@ -200,4 +190,4 @@ abstract class ParserRule { return $this->_dataHolder; } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/Printer.php b/lib/Doctrine/ORM/Query/Printer.php index 84af04054..972ad518f 100644 --- a/lib/Doctrine/ORM/Query/Printer.php +++ b/lib/Doctrine/ORM/Query/Printer.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query; + /** * A parse tree printer for Doctrine Query Language parser. * @@ -28,7 +30,7 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_Printer +class Printer { /** * Current indentation level @@ -90,4 +92,4 @@ class Doctrine_ORM_Query_Printer echo str_repeat(' ', $this->_indent), $str, "\n"; } } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/Production/AggregateExpression.php b/lib/Doctrine/ORM/Query/Production/AggregateExpression.php index 311dde66a..bb64bddb8 100644 --- a/lib/Doctrine/ORM/Query/Production/AggregateExpression.php +++ b/lib/Doctrine/ORM/Query/Production/AggregateExpression.php @@ -19,6 +19,10 @@ * . */ +namespace Doctrine\ORM\Query\Production; + +use \Doctrine\ORM\Query\Token; + /** * AggregateExpression = ("AVG" | "MAX" | "MIN" | "SUM" | "COUNT") "(" ["DISTINCT"] Expression ")" * @@ -31,15 +35,12 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_Query_Production_AggregateExpression extends Doctrine_Query_Production +class AggregateExpression extends Doctrine_Query_Production { protected $_functionName; - protected $_isDistinct; - protected $_expression; - public function syntax($paramHolder) { // AggregateExpression = ("AVG" | "MAX" | "MIN" | "SUM" | "COUNT") "(" ["DISTINCT"] Expression ")" @@ -47,11 +48,11 @@ class Doctrine_Query_Production_AggregateExpression extends Doctrine_Query_Produ $token = $this->_parser->lookahead; switch ($token['type']) { - case Doctrine_Query_Token::T_AVG: - case Doctrine_Query_Token::T_MAX: - case Doctrine_Query_Token::T_MIN: - case Doctrine_Query_Token::T_SUM: - case Doctrine_Query_Token::T_COUNT: + case Token::T_AVG: + case Token::T_MAX: + case Token::T_MIN: + case Token::T_SUM: + case Token::T_COUNT: $this->_parser->match($token['type']); $this->_functionName = strtoupper($token['value']); break; @@ -63,8 +64,8 @@ class Doctrine_Query_Production_AggregateExpression extends Doctrine_Query_Produ $this->_parser->match('('); - if ($this->_isNextToken(Doctrine_Query_Token::T_DISTINCT)) { - $this->_parser->match(Doctrine_Query_Token::T_DISTINCT); + if ($this->_isNextToken(Token::T_DISTINCT)) { + $this->_parser->match(Token::T_DISTINCT); $this->_isDistinct = true; } @@ -115,4 +116,4 @@ class Doctrine_Query_Production_AggregateExpression extends Doctrine_Query_Produ { return $this->_isDistinct; } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/Production/Factor.php b/lib/Doctrine/ORM/Query/Production/Factor.php index b4d585861..466e52036 100644 --- a/lib/Doctrine/ORM/Query/Production/Factor.php +++ b/lib/Doctrine/ORM/Query/Production/Factor.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\Query\Production; + /** * Factor = [("+" | "-")] Primary * @@ -31,13 +33,12 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_Query_Production_Factor extends Doctrine_Query_Production +class Factor extends \Doctrine\Query\Production { protected $_type; protected $_primary; - public function syntax($paramHolder) { // Factor = [("+" | "-")] Primary @@ -57,13 +58,11 @@ class Doctrine_Query_Production_Factor extends Doctrine_Query_Production } } - public function semantical($paramHolder) { $this->_primary->semantical($paramHolder); } - public function buildSql() { return $this->_type . ' ' . $this->_primary->buildSql(); @@ -91,4 +90,4 @@ class Doctrine_Query_Production_Factor extends Doctrine_Query_Production { return $this->_primary; } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/QueryException.php b/lib/Doctrine/ORM/Query/QueryException.php index 13cf3e6e9..95e8dd657 100644 --- a/lib/Doctrine/ORM/Query/QueryException.php +++ b/lib/Doctrine/ORM/Query/QueryException.php @@ -11,7 +11,10 @@ namespace Doctrine\ORM\Query; * * @author robo */ -class QueryException extends \Doctrine\Common\DoctrineException { - -} - +class QueryException extends \Doctrine\Common\DoctrineException +{ + public static function nonUniqueResult() + { + return new self("The query contains more than one result."); + } +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/QueryResult.php b/lib/Doctrine/ORM/Query/QueryResult.php index eda2ae343..3fd1c550e 100644 --- a/lib/Doctrine/ORM/Query/QueryResult.php +++ b/lib/Doctrine/ORM/Query/QueryResult.php @@ -19,6 +19,8 @@ * . */ +namespace Doctrine\ORM\Query; + /** * Doctrine_ORM_Query_QueryResult * @@ -29,7 +31,7 @@ * @since 2.0 * @version $Revision$ */ -class Doctrine_ORM_Query_QueryResult extends Doctrine_ORM_Query_AbstractResult +class QueryResult extends AbstractResult { /** * Returns cached resultset. @@ -40,5 +42,4 @@ class Doctrine_ORM_Query_QueryResult extends Doctrine_ORM_Query_AbstractResult { return $this->_data; } - -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/SqlWalker.php b/lib/Doctrine/ORM/Query/SqlWalker.php index a63cc649b..6b8aa772b 100644 --- a/lib/Doctrine/ORM/Query/SqlWalker.php +++ b/lib/Doctrine/ORM/Query/SqlWalker.php @@ -397,5 +397,4 @@ class SqlWalker { return strtolower(substr($tableName, 0, 1)) . $this->_tableAliasCounter++; } -} - +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/Query/Token.php b/lib/Doctrine/ORM/Query/Token.php index ee330c4c8..ea886416d 100644 --- a/lib/Doctrine/ORM/Query/Token.php +++ b/lib/Doctrine/ORM/Query/Token.php @@ -85,25 +85,20 @@ final class Token const T_UPDATE = 143; const T_WHERE = 144; const T_WITH = 145; - const T_TRUE = 146; const T_FALSE = 147; - protected $_keywordsTable; - public function __construct() { } - protected function addKeyword($token, $value) { $this->_keywordsTable[$token] = $value; } - public function getLiteral($token) { if ( ! $this->_keywordsTable) { @@ -159,4 +154,4 @@ final class Token ? $this->_keywordsTable[$token] : (is_string($token) ? $token : ''); } -} +} \ No newline at end of file diff --git a/lib/Doctrine/ORM/VirtualProxy.php b/lib/Doctrine/ORM/VirtualProxy.php index cd90ff877..02921de9a 100644 --- a/lib/Doctrine/ORM/VirtualProxy.php +++ b/lib/Doctrine/ORM/VirtualProxy.php @@ -89,5 +89,4 @@ class VirtualProxy $realInstance = $this->_load(); unset($realInstance->$prop); } -} - +} \ No newline at end of file