Commit 22e94ac5 authored by romanb's avatar romanb

Enabling namespaces. Final restructurings.

parent 4ab2ba7d
<?php
namespace Doctrine\Common;
/**
* A class loader used to load class files on demand.
*
......@@ -17,9 +20,9 @@
* @since 2.0
* @author romanb <roman@code-factory.org>
*/
class Doctrine_Common_ClassLoader
class ClassLoader
{
private $_namespaceSeparator = '_';
private $_namespaceSeparator = '\\';
private $_fileExtension = '.php';
private $_checkFileExists = false;
private $_basePaths = array();
......@@ -71,7 +74,10 @@ class Doctrine_Common_ClassLoader
if (isset($this->_basePaths[$prefix])) {
$class .= $this->_basePaths[$prefix] . DIRECTORY_SEPARATOR;
}
$class .= str_replace($this->_namespaceSeparator, DIRECTORY_SEPARATOR, $className)
if ($className[0] == '\\') $className = substr($className, 1);
$class .= str_replace(array($this->_namespaceSeparator, '_'), DIRECTORY_SEPARATOR, $className)
. $this->_fileExtension;
if ($this->_checkFileExists) {
......@@ -81,6 +87,21 @@ class Doctrine_Common_ClassLoader
@fclose($fh);
}
if ($class == 'ForumAvatar.php' || $class == 'ForumUser.php') {
echo $class . PHP_EOL;
try {
throw new \Exception();
} catch (\Exception $e) {
echo $e->getTraceAsString();
}
} else if ($class == 'Doctrine/Common/Exceptions/DoctrineException.php') {
try {
throw new \Exception();
} catch (\Exception $e) {
echo $e->getTraceAsString();
}
}
require $class;
return true;
......
......@@ -4,11 +4,11 @@
* and open the template in the editor.
*/
#namespace Doctrine\Common\Collections;
namespace Doctrine\Common\Collections;
#use \Countable;
#use \IteratorAggregate;
#use \ArrayAccess;
use \Countable;
use \IteratorAggregate;
use \ArrayAccess;
/**
* A Collection is a wrapper around a php array and just like a php array a
......@@ -16,7 +16,7 @@
*
* @author robo
*/
class Doctrine_Common_Collections_Collection implements Countable, IteratorAggregate, ArrayAccess
class Collection implements Countable, IteratorAggregate, ArrayAccess
{
/**
* An array containing the entries of this collection.
......@@ -323,7 +323,7 @@ class Doctrine_Common_Collections_Collection implements Countable, IteratorAggre
*/
public function map(Closure $func)
{
return new Doctrine_Common_Collections_Collection(array_map($func, $this->_data));
return new Collection(array_map($func, $this->_data));
}
/**
......@@ -334,7 +334,7 @@ class Doctrine_Common_Collections_Collection implements Countable, IteratorAggre
*/
public function filter(Closure $func)
{
return new Doctrine_Common_Collections_Collection(array_filter($this->_data, $func));
return new Collection(array_filter($this->_data, $func));
}
/**
......
<?php
class Doctrine_Common_Exceptions_DoctrineException extends Exception
namespace Doctrine\Common;
class DoctrineException extends \Exception
{
private $_innerException;
......@@ -21,4 +23,3 @@ class Doctrine_Common_Exceptions_DoctrineException extends Exception
}
}
?>
\ No newline at end of file
......@@ -19,7 +19,9 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\Common;
namespace Doctrine\Common;
use Doctrine\Common\Events\Event;
/**
* The EventManager is the central point of Doctrine's event listener system.
......@@ -30,7 +32,7 @@
* @author Guilherme Blanco <guilhermeblanco@hotmail.com>
* @since 2.0
*/
class Doctrine_Common_EventManager
class EventManager
{
/**
* Map of registered listeners.
......@@ -52,7 +54,7 @@ class Doctrine_Common_EventManager
$callback = $argIsCallback ? $event : $event->getType();
if (isset($this->_listeners[$callback])) {
$event = $argIsCallback ? new Doctrine_Event($event) : $event;
$event = $argIsCallback ? new Event($event) : $event;
foreach ($this->_listeners[$callback] as $listener) {
$listener->$callback($event);
}
......@@ -103,10 +105,9 @@ class Doctrine_Common_EventManager
*
* @param Doctrine\Common\EventSubscriber $subscriber The subscriber.
*/
public function addEventSubscriber(Doctrine_Common_EventSubscriber $subscriber)
public function addEventSubscriber(EventSubscriber $subscriber)
{
$this->addEventListener($subscriber->getSubscribedEvents(), $subscriber);
}
}
?>
\ No newline at end of file
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine::Common;
namespace Doctrine\Common;
/**
* An EventSubscriber knows himself what events he is interested in.
......@@ -33,7 +33,7 @@
* @since 2.0
* @version $Revision: 4653 $
*/
interface Doctrine_Common_EventSubscriber
interface EventSubscriber
{
public function getSubscribedEvents();
}
......@@ -19,20 +19,18 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\Common\Events;
namespace Doctrine\Common\Events;
/**
* Doctrine_Event
*
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @package Doctrine
* @subpackage Event
* @link www.phpdoctrine.org
* @since 2.0
* @version $Revision$
*/
class Doctrine_Common_Events_Event
class Event
{
/* Event callback constants */
const preDelete = 'preDelete';
......
......@@ -19,7 +19,9 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\DBAL;
namespace Doctrine\DBAL;
use Doctrine\DBAL\Types\Type;
/**
* Configuration container for the Doctrine DBAL.
......@@ -30,7 +32,7 @@
* @author Roman Borschel <roman@code-factory.org>
* @since 2.0
*/
class Doctrine_DBAL_Configuration
class Configuration
{
/**
* The attributes that are contained in the configuration.
......@@ -99,14 +101,14 @@ class Doctrine_DBAL_Configuration
public function setCustomTypes(array $types)
{
foreach ($types as $name => $typeClassName) {
Doctrine_DBAL_Types_Type::addCustomType($name, $typeClassName);
Type::addCustomType($name, $typeClassName);
}
}
public function setTypeOverrides(array $overrides)
{
foreach ($override as $name => $typeClassName) {
Doctrine_DBAL_Types_Type::overrideType($name, $typeClassName);
Type::overrideType($name, $typeClassName);
}
}
}
\ No newline at end of file
......@@ -19,9 +19,10 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\DBAL;
namespace Doctrine\DBAL;
#use Doctrine\Common\EventManager;
use Doctrine\Common\EventManager;
use Doctrine\Common\DoctrineException;
#use Doctrine\DBAL\Exceptions\ConnectionException;
/**
......@@ -53,7 +54,7 @@
* Doctrine\DBAL could ship with a simple standard broker that uses a primitive
* round-robin approach to distribution. User can provide its own brokers.
*/
class Doctrine_DBAL_Connection
class Connection
{
/**
* Constant for transaction isolation level READ UNCOMMITTED.
......@@ -155,9 +156,9 @@ class Doctrine_DBAL_Connection
*
* @param array $params The connection parameters.
*/
public function __construct(array $params, Doctrine_DBAL_Driver $driver,
Doctrine_DBAL_Configuration $config = null,
Doctrine_Common_EventManager $eventManager = null)
public function __construct(array $params, Driver $driver,
Configuration $config = null,
EventManager $eventManager = null)
{
$this->_driver = $driver;
$this->_params = $params;
......@@ -169,10 +170,10 @@ class Doctrine_DBAL_Connection
// Create default config and event manager if none given
if ( ! $config) {
$this->_config = new Doctrine_DBAL_Configuration();
$this->_config = new Configuration();
}
if ( ! $eventManager) {
$this->_eventManager = new Doctrine_Common_EventManager();
$this->_eventManager = new EventManager();
}
$this->_platform = $driver->getDatabasePlatform();
......@@ -702,7 +703,7 @@ class Doctrine_DBAL_Connection
public function commit()
{
if ($this->_transactionNestingLevel == 0) {
throw new Doctrine_Exception("Commit failed. There is no active transaction.");
throw new DoctrineException("Commit failed. There is no active transaction.");
}
$this->connect();
......
<?php
namespace Doctrine\DBAL;
/**
* Driver interface.
* Interface that all DBAL drivers must implement.
*
* @since 2.0
*/
interface Doctrine_DBAL_Driver
interface Driver
{
/**
* Attempts to create a connection with the database.
......@@ -32,7 +35,6 @@ interface Doctrine_DBAL_Driver
*
* @return Doctrine\DBAL\SchemaManager
*/
public function getSchemaManager(Doctrine_DBAL_Connection $conn);
public function getSchemaManager(Connection $conn);
}
?>
\ No newline at end of file
<?php
namespace Doctrine\DBAL\Driver;
/**
* Connection interface.
* Drivers must implement this interface.
......@@ -8,7 +10,7 @@
*
* @since 2.0
*/
interface Doctrine_DBAL_Driver_Connection
interface Connection
{
public function prepare($prepareString);
public function query();
......
<?php
namespace Doctrine\DBAL\Driver;
use \PDO;
/**
* PDO implementation of the driver Connection interface.
* Used by all PDO-based drivers.
*
* @since 2.0
*/
class Doctrine_DBAL_Driver_PDOConnection extends PDO implements Doctrine_DBAL_Driver_Connection
class PDOConnection extends PDO implements \Doctrine\DBAL\Driver\Connection
{
public function __construct($dsn, $user = null, $password = null, array $options = null)
{
parent::__construct($dsn, $user, $password, $options);
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('Doctrine_DBAL_Driver_PDOStatement', array()));
$this->setAttribute(PDO::ATTR_STATEMENT_CLASS, array('Doctrine\DBAL\Driver\PDOStatement', array()));
$this->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$this->setAttribute(PDO::ATTR_CASE, PDO::CASE_LOWER);
}
......
<?php
#namespace Doctrine::DBAL::Driver::PDOMsSql;
namespace Doctrine\DBAL\Driver\PDOMsSql;
/**
* MsSql Connection implementation.
*
* @since 2.0
*/
class Doctrine_DBAL_Driver_PDOMsSql_Connection extends PDO implements Doctrine_DBAL_Driver_Connection
class Connection extends PDO implements \Doctrine\DBAL\Driver\Connection
{
/**
* Performs the rollback.
......@@ -40,4 +40,3 @@ class Doctrine_DBAL_Driver_PDOMsSql_Connection extends PDO implements Doctrine_D
}
}
?>
\ No newline at end of file
<?php
#namespace Doctrine::DBAL::Driver::PDOMySql;
namespace Doctrine\DBAL\Driver\PDOMsSql;
#use Doctrine::DBAL::Driver;
class Doctrine_DBAL_Driver_PDOMsSql_Driver implements Doctrine_DBAL_Driver
class Driver implements \Doctrine\DBAL\Driver
{
public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
{
return new Doctrine_DBAL_Driver_MsSql_Connection(
return new Connection(
$this->_constructPdoDsn($params),
$username,
$password,
......@@ -40,4 +38,3 @@ class Doctrine_DBAL_Driver_PDOMsSql_Driver implements Doctrine_DBAL_Driver
}
?>
\ No newline at end of file
<?php
#namespace Doctrine::DBAL::Driver::PDOOracle;
namespace Doctrine\DBAL\Driver\PDOOracle;
#use Doctrine::DBAL::Driver;
class Doctrine_DBAL_Driver_PDOOracle_Driver implements Doctrine_DBAL_Driver
class Driver implements \Doctrine\DBAL\Driver
{
public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
{
return new Doctrine_DBAL_Driver_PDOConnection(
return new \Doctrine\DBAL\Driver\PDOConnection(
$this->_constructPdoDsn($params),
$username,
$password,
......@@ -28,14 +26,13 @@ class Doctrine_DBAL_Driver_PDOOracle_Driver implements Doctrine_DBAL_Driver
public function getDatabasePlatform()
{
return new Doctrine_DatabasePlatform_OraclePlatform();
return new \Doctrine\DBAL\Platforms\OraclePlatform();
}
public function getSchemaManager(Doctrine_Connection $conn)
public function getSchemaManager(\Doctrine\DBAL\Connection $conn)
{
return new Doctrine_Schema_OracleSchemaManager($conn);
return new \Doctrine\DBAL\Schema\OracleSchemaManager($conn);
}
}
?>
\ No newline at end of file
<?php
#namespace Doctrine::DBAL::Driver::PDOOracle;
namespace Doctrine\DBAL\Driver\PDOSqlite;
#use Doctrine::DBAL::Driver;
......@@ -9,7 +9,7 @@
*
* @since 2.0
*/
class Doctrine_DBAL_Driver_PDOSqlite_Driver implements Doctrine_DBAL_Driver
class Driver implements \Doctrine\DBAL\Driver
{
/**
* Tries to establish a database connection to SQLite.
......@@ -22,7 +22,7 @@ class Doctrine_DBAL_Driver_PDOSqlite_Driver implements Doctrine_DBAL_Driver
*/
public function connect(array $params, $username = null, $password = null, array $driverOptions = array())
{
return new Doctrine_DBAL_Driver_PDOConnection(
return new \Doctrine\DBAL\Driver\PDOConnection(
$this->_constructPdoDsn($params),
$username,
$password,
......@@ -52,7 +52,7 @@ class Doctrine_DBAL_Driver_PDOSqlite_Driver implements Doctrine_DBAL_Driver
*/
public function getDatabasePlatform()
{
return new Doctrine_DBAL_Platforms_SqlitePlatform();
return new \Doctrine\DBAL\Platforms\SqlitePlatform();
}
/**
......@@ -61,9 +61,9 @@ class Doctrine_DBAL_Driver_PDOSqlite_Driver implements Doctrine_DBAL_Driver
* @param Doctrine\DBAL\Connection $conn
* @return Doctrine\DBAL\Schema\SqliteSchemaManager
*/
public function getSchemaManager(Doctrine_DBAL_Connection $conn)
public function getSchemaManager(\Doctrine\DBAL\Connection $conn)
{
return new Doctrine_DBAL_Schema_SqliteSchemaManager($conn);
return new \Doctrine\DBAL\Schema\SqliteSchemaManager($conn);
}
}
......
<?php
class Doctrine_DBAL_Driver_PDOStatement extends PDOStatement implements Doctrine_DBAL_Driver_Statement
namespace Doctrine\DBAL\Driver;
class PDOStatement extends \PDOStatement implements \Doctrine\DBAL\Driver\Statement
{
private function __construct() {}
}
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\DBAL\Driver;
namespace Doctrine\DBAL\Driver;
/**
* Statement interface.
......@@ -34,7 +34,7 @@
* @since 2.0
* @version $Revision$
*/
interface Doctrine_DBAL_Driver_Statement
interface Statement
{
/**
* Bind a column to a PHP variable
......
......@@ -19,7 +19,9 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\DBAL;
namespace Doctrine\DBAL;
use Doctrine\Common\EventManager;
/**
* Factory for creating Doctrine\DBAL\Connection instances.
......@@ -27,7 +29,7 @@
* @author Roman Borschel <roman@code-factory.org>
* @since 2.0
*/
final class Doctrine_DBAL_DriverManager
final class DriverManager
{
/**
* List of supported drivers and their mappings to the driver class.
......@@ -35,13 +37,13 @@ final class Doctrine_DBAL_DriverManager
* @var array
*/
private static $_driverMap = array(
'pdo_mysql' => 'Doctrine_DBAL_Driver_PDOMySql_Driver',
'pdo_sqlite' => 'Doctrine_DBAL_Driver_PDOSqlite_Driver',
'pdo_pgsql' => 'Doctrine_DBAL_Driver_PDOPgSql_Driver',
'pdo_oracle' => 'Doctrine_DBAL_Driver_PDOOracle_Driver',
'pdo_mssql' => 'Doctrine_DBAL_Driver_PDOMsSql_Driver',
'pdo_firebird' => 'Doctrine_DBAL_Driver_PDOFirebird_Driver',
'pdo_informix' => 'Doctrine_DBAL_Driver_PDOInformix_Driver',
'pdo_mysql' => 'Doctrine\DBAL\Driver\PDOMySql\Driver',
'pdo_sqlite' => 'Doctrine\DBAL\Driver\PDOSqlite\Driver',
'pdo_pgsql' => 'Doctrine\DBAL\Driver\PDOPgSql\Driver',
'pdo_oracle' => 'Doctrine\DBAL\Driver\PDOOracle\Driver',
'pdo_mssql' => 'Doctrine\DBAL\Driver\PDOMsSql\Driver',
'pdo_firebird' => 'Doctrine\DBAL\Driver\PDOFirebird\Driver',
'pdo_informix' => 'Doctrine\DBAL\Driver\PDOInformix\Driver',
);
/** Private constructor. This class cannot be instantiated. */
......@@ -92,20 +94,20 @@ final class Doctrine_DBAL_DriverManager
* @return Doctrine\DBAL\Connection
*/
public static function getConnection(array $params,
Doctrine_DBAL_Configuration $config = null,
Doctrine_Common_EventManager $eventManager = null)
Configuration $config = null,
EventManager $eventManager = null)
{
// create default config and event manager, if not set
if ( ! $config) {
$config = new Doctrine_DBAL_Configuration();
$config = new Configuration();
}
if ( ! $eventManager) {
$eventManager = new Doctrine_Common_EventManager();
$eventManager = new EventManager();
}
// check for existing pdo object
if (isset($params['pdo']) && ! $params['pdo'] instanceof PDO) {
throw Doctrine_DBAL_Exceptions_DBALException::invalidPDOInstance();
throw DBALException::invalidPDOInstance();
} else if (isset($params['pdo'])) {
$params['driver'] = $params['pdo']->getAttribute(PDO::ATTR_DRIVER_NAME);
} else {
......@@ -119,7 +121,7 @@ final class Doctrine_DBAL_DriverManager
$driver = new $className();
$wrapperClass = 'Doctrine_DBAL_Connection';
$wrapperClass = 'Doctrine\DBAL\Connection';
if (isset($params['wrapperClass']) && is_subclass_of($params['wrapperClass'], $wrapperClass)) {
$wrapperClass = $params['wrapperClass'];
}
......@@ -138,16 +140,15 @@ final class Doctrine_DBAL_DriverManager
// driver
if ( ! isset($params['driver']) && ! isset($params['driverClass'])) {
throw Doctrine_ConnectionFactory_Exception::driverRequired();
throw DBALException::driverRequired();
}
// check validity of parameters
// driver
if ( isset($params['driver']) && ! isset(self::$_driverMap[$params['driver']])) {
throw Doctrine_DBAL_Exceptions_DBALException::unknownDriver($params['driver']);
throw DBALException::unknownDriver($params['driver']);
}
}
}
?>
\ No newline at end of file
<?php
namespace Doctrine\DBAL\Exceptions;
use Doctrine\Common\DoctrineException;
/**
*
*
......@@ -11,7 +15,7 @@
* @version $Revision: 1080 $
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
class Doctrine_DBAL_Exceptions_DBALException extends Exception
class DBALException extends DoctrineException
{
public static function invalidPDOInstance()
{
......
......@@ -19,7 +19,9 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\DBAL\Platforms;
namespace Doctrine\DBAL\Platforms;
use Doctrine\DBAL\Connection;
/**
* Base class for all DatabasePlatforms. The DatabasePlatforms are the central
......@@ -30,7 +32,7 @@
* @author Roman Borschel <roman@code-factory.org>
* @author Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library)
*/
abstract class Doctrine_DBAL_Platforms_AbstractPlatform
abstract class AbstractPlatform
{
protected $_quoteIdentifiers = false;
......@@ -1766,7 +1768,7 @@ abstract class Doctrine_DBAL_Platforms_AbstractPlatform
public function getProperty($name)
{
if ( ! isset($this->_properties[$name])) {
throw Doctrine_Connection_Exception::unknownProperty($name);
throw DoctrineException::unknownProperty($name);
}
return $this->_properties[$name];
}
......@@ -1813,13 +1815,13 @@ abstract class Doctrine_DBAL_Platforms_AbstractPlatform
protected function _getTransactionIsolationLevelSql($level)
{
switch ($level) {
case Doctrine_DBAL_Connection::TRANSACTION_READ_UNCOMMITTED:
case Connection::TRANSACTION_READ_UNCOMMITTED:
return 'READ UNCOMMITTED';
case Doctrine_DBAL_Connection::TRANSACTION_READ_COMMITTED:
case Connection::TRANSACTION_READ_COMMITTED:
return 'READ COMMITTED';
case Doctrine_DBAL_Connection::TRANSACTION_REPEATABLE_READ:
case Connection::TRANSACTION_REPEATABLE_READ:
return 'REPEATABLE READ';
case Doctrine_DBAL_Connection::TRANSACTION_SERIALIZABLE:
case Connection::TRANSACTION_SERIALIZABLE:
return 'SERIALIZABLE';
default:
throw new Doctrine_Common_Exceptions_DoctrineException('isolation level is not supported: ' . $isolation);
......@@ -1833,7 +1835,7 @@ abstract class Doctrine_DBAL_Platforms_AbstractPlatform
*/
public function getSetTransactionIsolationSql($level)
{
throw new Doctrine_Export_Exception('Set transaction isolation not supported by this platform.');
throw new DoctrineException('Set transaction isolation not supported by this platform.');
}
/**
......@@ -1844,7 +1846,7 @@ abstract class Doctrine_DBAL_Platforms_AbstractPlatform
*/
public function getDefaultTransactionIsolationLevel()
{
return Doctrine_DBAL_Connection::TRANSACTION_READ_COMMITTED;
return Connection::TRANSACTION_READ_COMMITTED;
}
......
<?php
#namespace Doctrine::DBAL::Platforms;
namespace Doctrine\DBAL\Platforms;
class Doctrine_DBAL_Platforms_Db2Platform extends Doctrine_DBAL_Platforms_AbstractPlatform
class Db2Platform extends AbstractPlatform
{
public function getSequenceNextValSql($sequenceName) {
......@@ -12,4 +12,3 @@ class Doctrine_DBAL_Platforms_Db2Platform extends Doctrine_DBAL_Platforms_Abstra
}
?>
\ No newline at end of file
<?php
#namespace Doctrine::DBAL::Platforms;
namespace Doctrine\DBAL\Platforms;
/**
* Enter description here...
*
* @since 2.0
*/
class Doctrine_DBAL_Platforms_FirebirdPlatform extends Doctrine_DBAL_Platforms_AbstractPlatform
class FirebirdPlatform extends AbstractPlatform
{
/**
......
<?php
#namespace Doctrine::DBAL::Platforms;
namespace Doctrine\DBAL\Platforms;
/**
* Enter description here...
*
* @since 2.0
*/
class Doctrine_DBAL_Platforms_InformixPlatform extends Doctrine_DBAL_Platforms_AbstractPlatform
class InformixPlatform extends AbstractPlatform
{
public function __construct()
......
<?php
#namespace Doctrine::DBAL::Platforms;
namespace Doctrine\DBAL\Platforms;
class Doctrine_DBAL_Platforms_MockPlatform extends Doctrine_DBAL_Platforms_AbstractPlatform
class MockPlatform extends AbstractPlatform
{
public function getNativeDeclaration(array $field) {}
public function getPortableDeclaration(array $field) {}
}
?>
\ No newline at end of file
<?php
#namespace Doctrine::DBAL::Platforms;
namespace Doctrine\DBAL\Platforms;
class Doctrine_DBAL_Platforms_MsSqlPlatform extends Doctrine_DBAL_Platforms_AbstractPlatform
class MsSqlPlatform extends AbstractPlatform
{
/**
* the constructor
......
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\DBAL\Platforms;
namespace Doctrine\DBAL\Platforms;
/**
* The MySqlPlatform provides the behavior, features and SQL dialect of the
......@@ -28,7 +28,7 @@
* @since 2.0
* @author Roman Borschel <roman@code-factory.org>
*/
class Doctrine_DBAL_Platforms_MySqlPlatform extends Doctrine_DBAL_Platforms_AbstractPlatform
class MySqlPlatform extends AbstractPlatform
{
/**
* MySql reserved words.
......
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine::DBAL::Platforms;
namespace Doctrine\DBAL\Platforms;
/**
* Base class for all DatabasePlatforms. The DatabasePlatforms are the central
......@@ -30,7 +30,7 @@
* @author Roman Borschel <roman@code-factory.org>
* @author Lukas Smith <smith@pooteeweet.org> (PEAR MDB2 library)
*/
class Doctrine_DBAL_Platforms_OraclePlatform extends Doctrine_DBAL_Platforms_AbstractPlatform
class OraclePlatform extends AbstractPlatform
{
/**
* Constructor.
......
<?php
#namespace Doctrine::DBAL::Platforms;
namespace Doctrine\DBAL\Platforms;
class Doctrine_DBAL_Platforms_PostgreSqlPlatform extends Doctrine_DBAL_Platforms_AbstractPlatform
class PostgreSqlPlatform extends AbstractPlatform
{
/**
* The reserved keywords by pgsql. Ordered alphabetically.
......
<?php
#namespace Doctrine::DBAL::Platforms;
namespace Doctrine\DBAL\Platforms;
/**
* Enter description here...
*
* @since 2.0
*/
class Doctrine_DBAL_Platforms_SqlitePlatform extends Doctrine_DBAL_Platforms_AbstractPlatform
class SqlitePlatform extends AbstractPlatform
{
/**
......
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\DBAL\Schema;
namespace Doctrine\DBAL\Schema;
/**
* Base class for schema managers. Schema managers are used to inspect and/or
......@@ -32,11 +32,11 @@
* @version $Revision$
* @since 2.0
*/
abstract class Doctrine_DBAL_Schema_AbstractSchemaManager
abstract class AbstractSchemaManager
{
protected $_conn;
public function __construct(Doctrine_DBAL_Connection $conn)
public function __construct(\Doctrine\DBAL\Connection $conn)
{
$this->_conn = $conn;
}
......
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine::DBAL::Schema;
namespace Doctrine\DBAL\Schema;
/**
* xxx
......@@ -31,13 +31,8 @@
* @version $Revision$
* @since 2.0
*/
class Doctrine_DBAL_Schema_FirebirdSchemaManager extends Doctrine_DBAL_Schema_AbstractSchemaManager
class FirebirdSchemaManager extends AbstractSchemaManager
{
public function __construct(Doctrine_Connection_Firebird $conn)
{
$this->_conn = $conn;
}
/**
* list all tables in the current database
*
......
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine::DBAL::Schema;
namespace Doctrine\DBAL\Schema;
/**
* xxx
......@@ -31,7 +31,7 @@
* @version $Revision$
* @since 2.0
*/
class Doctrine_DBAL_Schema_InformixSchemaManager extends Doctrine_DBAL_Schema_AbstractSchemaManager
class InformixSchemaManager extends AbstractSchemaManager
{
protected $sql = array(
'listTables' => "SELECT tabname,tabtype FROM systables WHERE tabtype IN ('T','V') AND owner != 'informix'",
......@@ -54,12 +54,8 @@ class Doctrine_DBAL_Schema_InformixSchemaManager extends Doctrine_DBAL_Schema_Ab
and s2.constrid=r.primary and i2.idxname=s2.idxname",
);
public function __construct(Doctrine_Connection_Informix $conn)
{
$this->_conn = $conn;
}
}
?>
\ No newline at end of file
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine::DBAL::Schema;
namespace Doctrine\DBAL\Schema;
/**
* xxx
......@@ -30,13 +30,8 @@
* @version $Revision$
* @since 2.0
*/
class Doctrine_DBAL_Schema_MsSqlSchemaManager extends Doctrine_DBAL_Schema_AbstractSchemaManager
class MsSqlSchemaManager extends AbstractSchemaManager
{
public function __construct(Doctrine_Connection_Mssql $conn)
{
$this->_conn = $conn;
}
/**
* create a new database
*
......
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\DBAL\Schema;
namespace Doctrine\DBAL\Schema;
/**
* xxx
......@@ -30,7 +30,7 @@
* @version $Revision$
* @since 2.0
*/
class Doctrine_DBAL_Schema_MySqlSchemaManager extends Doctrine_DBAL_Schema_AbstractSchemaManager
class MySqlSchemaManager extends AbstractSchemaManager
{
/**
* lists all database sequences
......
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\DBAL\Schema;
namespace Doctrine\DBAL\Schema;
/**
* xxx
......@@ -30,7 +30,7 @@
* @version $Revision$
* @since 2.0
*/
class Doctrine_DBAL_Schema_OracleSchemaManager extends Doctrine_DBAL_Schema_AbstractSchemaManager
class OracleSchemaManager extends AbstractSchemaManager
{
/**
* create a new database
......
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\DBAL\Schema;
namespace Doctrine\DBAL\Schema;
/**
* xxx
......@@ -30,7 +30,7 @@
* @version $Revision$
* @since 2.0
*/
class Doctrine_DBAL_Schema_PostgreSqlSchemaManager extends Doctrine_DBAL_Schema_AbstractSchemaManager
class PostgreSqlSchemaManager extends AbstractSchemaManager
{
/**
* alter an existing table
......
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\DBAL\Schema;
namespace Doctrine\DBAL\Schema;
/**
* xxx
......@@ -30,7 +30,7 @@
* @version $Revision$
* @since 2.0
*/
class Doctrine_DBAL_Schema_SqliteSchemaManager extends Doctrine_DBAL_Schema_AbstractSchemaManager
class SqliteSchemaManager extends AbstractSchemaManager
{
/**
* lists all databases
......
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine::DBAL;
namespace Doctrine\DBAL;
/**
* A thin wrapper around PDOStatement.
......@@ -31,7 +31,7 @@
* @version $Revision: 1532 $
* @todo Do we seriously need this wrapper?
*/
class Doctrine_DBAL_Statement
class Statement
{
/**
* @var Doctrine_Connection $conn Doctrine_Connection object, every connection
......@@ -51,13 +51,13 @@ class Doctrine_DBAL_Statement
* statement holds an instance of Doctrine_Connection
* @param mixed $stmt
*/
public function __construct(Doctrine_Connection $conn, $stmt)
public function __construct(Connection $conn, $stmt)
{
$this->_conn = $conn;
$this->_stmt = $stmt;
if ($stmt === false) {
throw new Doctrine_Exception('Unknown statement object given.');
throw new DoctrineException('Unknown statement object given.');
}
}
......
<?php
namespace Doctrine\DBAL\Types;
/**
* Type that maps PHP arrays to VARCHAR SQL type.
*
* @since 2.0
*/
class Doctrine_DBAL_Types_ArrayType extends Doctrine_DBAL_Types_Type
class ArrayType extends Type
{
......
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
namespace Doctrine\DBAL\Types;
/**
* Type that maps a database BIGINT to a PHP string.
*
* @author robo
*/
class Doctrine_DBAL_Types_BigIntType extends Doctrine_DBAL_Types_Type
class BigIntType extends Type
{
//put your code here
}
......
<?php
namespace Doctrine\DBAL\Types;
/**
* Type that maps an SQL boolean to a PHP boolean.
*
*/
class Doctrine_DBAL_Types_BooleanType extends Doctrine_DBAL_Types_Type
class BooleanType extends Type
{
/**
* Enter description here...
......
<?php
namespace Doctrine\DBAL\Types;
/**
* Type that maps a database CHAR to a PHP string.
*
* @author robo
*/
class CharType {
class CharType
{
//put your code here
}
<?php
namespace Doctrine\DBAL\Types;
/**
* Type that maps an SQL DATETIME to a PHP DateTime object.
*
* @since 2.0
*/
class Doctrine_DBAL_Types_DateTimeType extends Doctrine_DBAL_Types_Type
class DateTimeType extends Type
{
/**
* Enter description here...
......
<?php
namespace Doctrine\DBAL\Types;
/**
* Type that maps an SQL DECIMAL to a PHP double.
*
*/
class Doctrine_DBAL_Types_DecimalType extends Doctrine_DBAL_Types_Type
class DecimalType extends Type
{
}
?>
\ No newline at end of file
<?php
namespace Doctrine\DBAL\Types;
/**
* Type that maps an SQL INT to a PHP integer.
*
*/
class Doctrine_DBAL_Types_IntegerType extends Doctrine_DBAL_Types_Type
class IntegerType extends Type
{
public function getName() { return "Integer"; }
public function getSqlDeclaration(array $fieldDeclaration, Doctrine_DBAL_Platforms_AbstractPlatform $platform)
public function getSqlDeclaration(array $fieldDeclaration, \Doctrine\DBAL\Platforms\AbstractPlatform $platform)
{
return $platform->getIntegerTypeDeclarationSql($fieldDeclaration);
}
......
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
namespace Doctrine\DBAL\Types;
/**
* Description of MediumIntType
*
* @author robo
*/
class MediumIntType {
class MediumIntType
{
//put your code here
}
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
namespace Doctrine\DBAL\Types;
/**
* Description of SmallIntType
*
* @author robo
*/
class SmallIntType {
class SmallIntType
{
//put your code here
}
?>
<?php
namespace Doctrine\DBAL\Types;
/**
* Type that maps an SQL CLOB to a PHP string.
*
* @since 2.0
*/
class Doctrine_DBAL_Types_TextType extends Doctrine_DBAL_Types_Type
class TextType extends Type
{
/** @override */
public function getSqlDeclaration(array $fieldDeclaration, Doctrine_DatabasePlatform $platform)
......
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
namespace Doctrine\DBAL\Types;
/**
* Description of TinyIntType
*
* @author robo
*/
class TinyIntType {
class TinyIntType
{
//put your code here
}
<?php
#namespace Doctrine\DBAL\Types;
namespace Doctrine\DBAL\Types;
#use Doctrine\DBAL\Platforms\AbstractDatabasePlatform;
abstract class Doctrine_DBAL_Types_Type
abstract class Type
{
private static $_typeObjects = array();
private static $_typesMap = array(
'integer' => 'Doctrine_DBAL_Types_IntegerType',
'int' => 'Doctrine_DBAL_Types_IntegerType',
'tinyint' => 'Doctrine_DBAL_Types_TinyIntType',
'smallint' => 'Doctrine_DBAL_Types_SmallIntType',
'mediumint' => 'Doctrine_DBAL_Types_MediumIntType',
'bigint' => 'Doctrine_DBAL_Types_BigIntType',
'varchar' => 'Doctrine_DBAL_Types_VarcharType',
'text' => 'Doctrine_DBAL_Types_TextType',
'datetime' => 'Doctrine_DBAL_Types_DateTimeType',
'decimal' => 'Doctrine_DBAL_Types_DecimalType',
'double' => 'Doctrine_DBAL_Types_DoubleType'
'integer' => 'Doctrine\DBAL\Types\IntegerType',
'int' => '\Doctrine\DBAL\Types\IntegerType',
'tinyint' => '\Doctrine\DBAL\Types\TinyIntType',
'smallint' => '\Doctrine\DBAL\Types\SmallIntType',
'mediumint' => '\Doctrine\DBAL\Types\MediumIntType',
'bigint' => '\Doctrine\DBAL\Types\BigIntType',
'varchar' => 'Doctrine\DBAL\Types\VarcharType',
'text' => '\Doctrine\DBAL\Types\TextType',
'datetime' => '\Doctrine\DBAL\Types\DateTimeType',
'decimal' => '\Doctrine\DBAL\Types\DecimalType',
'double' => '\Doctrine\DBAL\Types\DoubleType'
);
public function convertToDatabaseValue($value, Doctrine_DBAL_Platforms_AbstractPlatform $platform)
public function convertToDatabaseValue($value, \Doctrine\DBAL\Platforms\AbstractPlatform $platform)
{
return $value;
}
......@@ -31,12 +31,12 @@ abstract class Doctrine_DBAL_Types_Type
return $value;
}
public function getDefaultLength(Doctrine_DBAL_Platforms_AbstractPlatform $platform)
public function getDefaultLength(\Doctrine\DBAL\Platforms\AbstractPlatform $platform)
{
return null;
}
abstract public function getSqlDeclaration(array $fieldDeclaration, Doctrine_DBAL_Platforms_AbstractPlatform $platform);
abstract public function getSqlDeclaration(array $fieldDeclaration, \Doctrine\DBAL\Platforms\AbstractPlatform $platform);
abstract public function getName();
/**
......@@ -55,7 +55,7 @@ abstract class Doctrine_DBAL_Types_Type
}
if ( ! isset(self::$_typeObjects[$name])) {
if ( ! isset(self::$_typesMap[$name])) {
throw new Doctrine_Exception("Unknown type: $name");
throw new DoctrineException("Unknown type: $name");
}
self::$_typeObjects[$name] = new self::$_typesMap[$name]();
}
......@@ -86,10 +86,9 @@ abstract class Doctrine_DBAL_Types_Type
public static function overrideType($name, $className)
{
if ( ! isset(self::$_typesMap[$name])) {
throw Doctrine_Exception::typeNotFound($name);
throw DoctrineException::typeNotFound($name);
}
self::$_typesMap[$name] = $className;
}
}
?>
\ No newline at end of file
<?php
#namespace Doctrine\DBAL\Types;
namespace Doctrine\DBAL\Types;
/**
* Type that maps an SQL VARCHAR to a PHP string.
*
* @since 2.0
*/
class Doctrine_DBAL_Types_VarcharType extends Doctrine_DBAL_Types_Type
class VarcharType extends Type
{
/** @override */
public function getSqlDeclaration(array $fieldDeclaration, Doctrine_DBAL_Platforms_AbstractPlatform $platform)
public function getSqlDeclaration(array $fieldDeclaration, \Doctrine\DBAL\Platforms\AbstractPlatform $platform)
{
return $platform->getVarcharDeclarationSql($fieldDeclaration);
}
/** @override */
public function getDefaultLength(Doctrine_DBAL_Platforms_AbstractPlatform $platform)
public function getDefaultLength(\Doctrine\DBAL\Platforms\AbstractPlatform $platform)
{
return $platform->getVarcharDefaultLength();
}
......
......@@ -20,6 +20,8 @@
* <http://www.phpdoctrine.org>.
*/
namespace Doctrine\ORM;
/**
* Doctrine_ORM_Query_Abstract
*
......@@ -33,7 +35,7 @@
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @todo See {@link Doctrine_ORM_Query}
*/
abstract class Doctrine_ORM_Query_Abstract
abstract class AbstractQuery
{
/**
* QUERY TYPE CONSTANTS
......
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\ORM;
namespace Doctrine\ORM;
/**
* A persistent collection wrapper.
......@@ -42,7 +42,7 @@
* @author Roman Borschel <roman@code-factory.org>
* @todo Rename to PersistentCollection
*/
final class Doctrine_ORM_Collection extends Doctrine_Common_Collections_Collection
final class Collection extends \Doctrine\Common\Collections\Collection
{
/**
* The base type of the collection.
......@@ -109,7 +109,7 @@ final class Doctrine_ORM_Collection extends Doctrine_Common_Collections_Collecti
/**
* Creates a new persistent collection.
*/
public function __construct(Doctrine_ORM_EntityManager $em, $entityBaseType, $keyField = null)
public function __construct(EntityManager $em, $entityBaseType, $keyField = null)
{
$this->_entityBaseType = $entityBaseType;
$this->_em = $em;
......@@ -151,7 +151,7 @@ final class Doctrine_ORM_Collection extends Doctrine_Common_Collections_Collecti
* @param object $entity
* @param AssociationMapping $relation
*/
public function _setOwner($entity, Doctrine_ORM_Mapping_AssociationMapping $relation)
public function _setOwner($entity, \Doctrine\ORM\Mapping\AssociationMapping $relation)
{
$this->_owner = $entity;
$this->_association = $relation;
......
......@@ -19,10 +19,9 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\ORM;
namespace Doctrine\ORM;
#use Doctrine\DBAL\Configuration;
#use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
/**
* Configuration container for all configuration options of Doctrine.
......@@ -34,7 +33,7 @@
* @author Roman Borschel <roman@code-factory.org>
* @since 2.0
*/
class Doctrine_ORM_Configuration extends Doctrine_DBAL_Configuration
class Configuration extends \Doctrine\DBAL\Configuration
{
/**
* Creates a new configuration that can be used for Doctrine.
......@@ -45,7 +44,7 @@ class Doctrine_ORM_Configuration extends Doctrine_DBAL_Configuration
'resultCacheImpl' => null,
'queryCacheImpl' => null,
'metadataCacheImpl' => null,
'metadataDriverImpl' => new Doctrine_ORM_Mapping_Driver_AnnotationDriver()
'metadataDriverImpl' => new AnnotationDriver()
));
}
......
......@@ -19,25 +19,25 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\ORM;
namespace Doctrine\ORM;
#use Doctrine\Common\Configuration;
#use Doctrine\Common\EventManager;
#use Doctrine\DBAL\Connection;
#use Doctrine\ORM\Exceptions\EntityManagerException;
#use Doctrine\ORM\Internal\UnitOfWork;
#use Doctrine\ORM\Mapping\ClassMetadata;
use Doctrine\Common\EventManager;
use Doctrine\Common\DoctrineException;
use Doctrine\DBAL\Connection;
use Doctrine\ORM\Exceptions\EntityManagerException;
use Doctrine\ORM\Mapping\ClassMetadata;
/**
* The EntityManager is the central access point to ORM functionality.
*
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.phpdoctrine.org
* @link www.doctrine-project.org
* @since 2.0
* @version $Revision$
* @author Roman Borschel <roman@code-factory.org>
*/
class Doctrine_ORM_EntityManager
class EntityManager
{
/**
* IMMEDIATE: Flush occurs automatically after each operation that issues database
......@@ -158,20 +158,20 @@ class Doctrine_ORM_EntityManager
* @param Doctrine\Common\EventManager $eventManager
*/
protected function __construct(
Doctrine_DBAL_Connection $conn,
Connection $conn,
$name,
Doctrine_ORM_Configuration $config,
Doctrine_Common_EventManager $eventManager)
Configuration $config,
EventManager $eventManager)
{
$this->_conn = $conn;
$this->_name = $name;
$this->_config = $config;
$this->_eventManager = $eventManager;
$this->_metadataFactory = new Doctrine_ORM_Mapping_ClassMetadataFactory(
$this->_metadataFactory = new \Doctrine\ORM\Mapping\ClassMetadataFactory(
$this->_config->getMetadataDriverImpl(),
$this->_conn->getDatabasePlatform());
$this->_metadataFactory->setCacheDriver($this->_config->getMetadataCacheImpl());
$this->_unitOfWork = new Doctrine_ORM_UnitOfWork($this);
$this->_unitOfWork = new UnitOfWork($this);
}
/**
......@@ -259,14 +259,14 @@ class Doctrine_ORM_EntityManager
*/
protected function _createIdGenerator($generatorType)
{
if ($generatorType == Doctrine_ORM_Mapping_ClassMetadata::GENERATOR_TYPE_IDENTITY) {
return new Doctrine_ORM_Id_IdentityGenerator($this);
} else if ($generatorType == Doctrine_ORM_Mapping_ClassMetadata::GENERATOR_TYPE_SEQUENCE) {
return new Doctrine_ORM_Id_SequenceGenerator($this);
} else if ($generatorType == Doctrine_ORM_Mapping_ClassMetadata::GENERATOR_TYPE_TABLE) {
return new Doctrine_ORM_Id_TableGenerator($this);
if ($generatorType == ClassMetadata::GENERATOR_TYPE_IDENTITY) {
return new \Doctrine\ORM\Id\IdentityGenerator($this);
} else if ($generatorType == ClassMetadata::GENERATOR_TYPE_SEQUENCE) {
return new \Doctrine\ORM\Id\SequenceGenerator($this);
} else if ($generatorType == ClassMetadata::GENERATOR_TYPE_TABLE) {
return new \Doctrine\ORM\Id\TableGenerator($this);
} else {
return new Doctrine_ORM_Id_Assigned($this);
return new \Doctrine\ORM\Id\Assigned($this);
}
}
......@@ -278,7 +278,7 @@ class Doctrine_ORM_EntityManager
*/
public function createQuery($dql = "")
{
$query = new Doctrine_ORM_Query($this);
$query = new Query($this);
if ( ! empty($dql)) {
$query->setDql($dql);
}
......@@ -298,9 +298,9 @@ class Doctrine_ORM_EntityManager
if ( ! isset($this->_persisters[$entityName])) {
$class = $this->getClassMetadata($entityName);
if ($class->isInheritanceTypeJoined()) {
$persister = new Doctrine_EntityPersister_JoinedSubclass($this, $class);
$persister = new \Doctrine\ORM\Persisters\JoinedSubclassPersister($this, $class);
} else {
$persister = new Doctrine_ORM_Persisters_StandardEntityPersister($this, $class);
$persister = new \Doctrine\ORM\Persisters\StandardEntityPersister($this, $class);
}
$this->_persisters[$entityName] = $persister;
}
......@@ -313,7 +313,7 @@ class Doctrine_ORM_EntityManager
* @param Doctrine\ORM\Entity $entity
* @return boolean
*/
public function detach(Doctrine_ORM_Entity $entity)
public function detach($entity)
{
return $this->_unitOfWork->removeFromIdentityMap($entity);
}
......@@ -385,7 +385,7 @@ class Doctrine_ORM_EntityManager
public function setFlushMode($flushMode)
{
if ( ! $this->_isFlushMode($flushMode)) {
throw Doctrine_ORM_Exceptions_EntityManagerException::invalidFlushMode();
throw EntityManagerException::invalidFlushMode();
}
$this->_flushMode = $flushMode;
}
......@@ -472,7 +472,7 @@ class Doctrine_ORM_EntityManager
public function refresh(Doctrine_ORM_Entity $entity)
{
$this->_mergeData($entity, $entity->getRepository()->find(
$entity->identifier(), Doctrine_Query::HYDRATE_ARRAY),
$entity->identifier(), Query::HYDRATE_ARRAY),
true);
}
......@@ -482,7 +482,7 @@ class Doctrine_ORM_EntityManager
* @param Doctrine\ORM\Entity $entity The entity to copy.
* @return Doctrine\ORM\Entity The new entity.
*/
public function copy(Doctrine_ORM_Entity $entity, $deep = false)
public function copy($entity, $deep = false)
{
//...
}
......@@ -504,7 +504,7 @@ class Doctrine_ORM_EntityManager
if ($customRepositoryClassName !== null) {
$repository = new $customRepositoryClassName($entityName, $metadata);
} else {
$repository = new Doctrine_ORM_EntityRepository($this, $metadata);
$repository = new \Doctrine\ORM\EntityRepository($this, $metadata);
}
$this->_repositories[$entityName] = $repository;
......@@ -552,7 +552,7 @@ class Doctrine_ORM_EntityManager
private function _errorIfNotActiveOrClosed()
{
if ($this->_closed) {
throw Doctrine_ORM_Exceptions_EntityManagerException::notActiveOrClosed($this->_name);
throw EntityManagerException::notActiveOrClosed($this->_name);
}
}
......@@ -587,23 +587,23 @@ class Doctrine_ORM_EntityManager
{
if ( ! isset($this->_hydrators[$hydrationMode])) {
switch ($hydrationMode) {
case Doctrine_ORM_Query::HYDRATE_OBJECT:
$this->_hydrators[$hydrationMode] = new Doctrine_ORM_Internal_Hydration_ObjectHydrator($this);
case Query::HYDRATE_OBJECT:
$this->_hydrators[$hydrationMode] = new \Doctrine\ORM\Internal\Hydration\ObjectHydrator($this);
break;
case Doctrine_ORM_Query::HYDRATE_ARRAY:
$this->_hydrators[$hydrationMode] = new Doctrine_ORM_Internal_Hydration_ArrayHydrator($this);
$this->_hydrators[$hydrationMode] = new \Doctrine\ORM\Internal\Hydration\ArrayHydrator($this);
break;
case Doctrine_ORM_Query::HYDRATE_SCALAR:
$this->_hydrators[$hydrationMode] = new Doctrine_ORM_Internal_Hydration_ScalarHydrator($this);
$this->_hydrators[$hydrationMode] = new \Doctrine\ORM\Internal\Hydration\ScalarHydrator($this);
break;
case Doctrine_ORM_Query::HYDRATE_SINGLE_SCALAR:
$this->_hydrators[$hydrationMode] = new Doctrine_ORM_Internal_Hydration_SingleScalarHydrator($this);
$this->_hydrators[$hydrationMode] = new \Doctrine\ORM\Internal\Hydration\SingleScalarHydrator($this);
break;
case Doctrine_ORM_Query::HYDRATE_NONE:
$this->_hydrators[$hydrationMode] = new Doctrine_ORM_Internal_Hydration_NoneHydrator($this);
$this->_hydrators[$hydrationMode] = new \Doctrine\ORM\Internal\Hydration\NoneHydrator($this);
break;
default:
throw new Doctrine_Exception("No hydrator found for hydration mode '$hydrationMode'.");
throw new DoctrineException("No hydrator found for hydration mode '$hydrationMode'.");
}
} else if ($this->_hydrators[$hydrationMode] instanceof Closure) {
$this->_hydrators[$hydrationMode] = $this->_hydrators[$hydrationMode]($this);
......@@ -649,23 +649,23 @@ class Doctrine_ORM_EntityManager
public static function create(
$conn,
$name,
Doctrine_ORM_Configuration $config = null,
Doctrine_Common_EventManager $eventManager = null)
Configuration $config = null,
EventManager $eventManager = null)
{
if (is_array($conn)) {
$conn = Doctrine_DBAL_DriverManager::getConnection($conn, $config, $eventManager);
} else if ( ! $conn instanceof Doctrine_DBAL_Connection) {
throw new Doctrine_Exception("Invalid parameter '$conn'.");
$conn = \Doctrine\DBAL\DriverManager::getConnection($conn, $config, $eventManager);
} else if ( ! $conn instanceof Connection) {
throw new DoctrineException("Invalid parameter '$conn'.");
}
if (is_null($config)) {
$config = new Doctrine_ORM_Configuration();
$config = new Configuration();
}
if (is_null($eventManager)) {
$eventManager = new Doctrine_Common_EventManager();
$eventManager = new EventManager();
}
$em = new Doctrine_ORM_EntityManager($conn, $name, $config, $eventManager);
$em = new EntityManager($conn, $name, $config, $eventManager);
return $em;
}
......
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\ORM;
namespace Doctrine\ORM;
/**
* A repository provides the illusion of an in-memory Entity store.
......@@ -32,13 +32,13 @@
* @version $Revision$
* @author Roman Borschel <roman@code-factory.org>
*/
class Doctrine_ORM_EntityRepository
class EntityRepository
{
protected $_entityName;
protected $_em;
protected $_classMetadata;
public function __construct($em, Doctrine_ORM_Mapping_ClassMetadata $classMetadata)
public function __construct($em, \Doctrine\ORM\Mapping\ClassMetadata $classMetadata)
{
$this->_entityName = $classMetadata->getClassName();
$this->_em = $em;
......
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine::ORM::Exceptions;
namespace Doctrine\ORM\Exceptions;
/**
* Doctrine_EntityManager_Exception
......@@ -31,7 +31,7 @@
* @since 2.0
* @version $Revision$
*/
class Doctrine_ORM_Exceptions_EntityManagerException extends Doctrine_ORM_Exceptions_ORMException
class EntityManagerException extends \Doctrine\Common\DoctrineException
{
public static function invalidFlushMode()
{
......
<?php
class Doctrine_ORM_Exceptions_HydrationException extends Doctrine_ORM_Exceptions_ORMException
namespace Doctrine\ORM\Exceptions;
class HydrationException extends \Doctrine\Common\DoctrineException
{
public static function nonUniqueResult()
......@@ -10,4 +12,3 @@ class Doctrine_ORM_Exceptions_HydrationException extends Doctrine_ORM_Exceptions
}
?>
\ No newline at end of file
......@@ -19,14 +19,14 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\ORM\Exceptions;
namespace Doctrine\ORM\Exceptions;
/**
* A MappingException indicates that something is wrong with the mapping setup.
*
* @since 2.0
*/
class Doctrine_ORM_Exceptions_MappingException extends Doctrine_ORM_Exceptions_ORMException
class MappingException extends \Doctrine\Common\DoctrineException
{
public static function identifierRequired($entityName)
{
......
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
namespace Doctrine\ORM\Exceptions;
/**
* Description of QueryException
*
* @author robo
*/
class QueryException extends \Doctrine\Common\DoctrineException {
}
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\ORM\Export;
namespace Doctrine\ORM\Export;
/**
* The ClassExporter can generate database schemas/structures from ClassMetadata
......@@ -35,14 +35,14 @@
* @since 2.0
* @version $Revision: 4805 $
*/
class Doctrine_ORM_Export_ClassExporter
class ClassExporter
{
/** The SchemaManager */
private $_sm;
/** The EntityManager */
private $_em;
public function __construct(Doctrine_ORM_EntityManager $em)
public function __construct(\Doctrine\ORM\EntityManager $em)
{
$this->_em = $em;
$this->_sm = $em->getConnection()->getSchemaManager();
......
<?php
#namespace Doctrine\ORM\Id;
namespace Doctrine\ORM\Id;
/**
* Enter description here...
*
* @todo Rename to AbstractIdGenerator
*/
abstract class Doctrine_ORM_Id_AbstractIdGenerator
abstract class AbstractIdGenerator
{
protected $_em;
public function __construct(Doctrine_ORM_EntityManager $em)
public function __construct(\Doctrine\ORM\EntityManager $em)
{
$this->_em = $em;
}
......
<?php
namespace Doctrine\ORM\Id;
/**
* Special generator for application-assigned identifiers (doesnt really generate anything).
*
* @since 2.0
* @author Roman Borschel <roman@code-factory.org>
*/
class Doctrine_ORM_Id_Assigned extends Doctrine_ORM_Id_AbstractIdGenerator
class Assigned extends AbstractIdGenerator
{
/**
* Returns the identifier assigned to the given entity.
......
<?php
class Doctrine_ORM_Id_IdentityGenerator extends Doctrine_ORM_Id_AbstractIdGenerator
namespace Doctrine\ORM\Id;
class IdentityGenerator extends AbstractIdGenerator
{
/**
* Enter description here...
......
<?php
class Doctrine_ORM_Id_SequenceGenerator extends Doctrine_ORM_Id_AbstractIdGenerator
namespace Doctrine\ORM\Id;
class SequenceGenerator extends AbstractIdGenerator
{
private $_sequenceName;
......@@ -23,4 +25,3 @@ class Doctrine_ORM_Id_SequenceGenerator extends Doctrine_ORM_Id_AbstractIdGenera
}
}
?>
\ No newline at end of file
<?php
class Doctrine_ORM_Id_SequenceIdentityGenerator extends Doctrine_ORM_Id_IdentityGenerator
namespace Doctrine\ORM\Id;
class SequenceIdentityGenerator extends IdentityGenerator
{
private $_sequenceName;
......@@ -22,4 +24,3 @@ class Doctrine_ORM_Id_SequenceIdentityGenerator extends Doctrine_ORM_Id_Identity
}
?>
\ No newline at end of file
<?php
namespace Doctrine\ORM\Id;
/**
* Id generator that uses a single-row database table and a hi/lo algorithm.
*
* @since 2.0
*/
class Doctrine_ORM_Id_TableGenerator extends Doctrine_ORM_Id_AbstractIdGenerator
class TableGenerator extends AbstractIdGenerator
{
public function generate($entity)
{
throw new Exception("Not implemented");
throw new \Exception("Not implemented");
}
}
?>
\ No newline at end of file
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\ORM\Internal;
namespace Doctrine\ORM\Internal;
/**
* The CommitOrderCalculator is used by the UnitOfWork to sort out the
......@@ -28,7 +28,7 @@
* @since 2.0
* @author Roman Borschel <roman@code-factory.org>
*/
class Doctrine_ORM_Internal_CommitOrderCalculator
class CommitOrderCalculator
{
private $_currentTime;
......@@ -106,7 +106,7 @@ class Doctrine_ORM_Internal_CommitOrderCalculator
*/
public function addNodeWithItem($key, $item)
{
$this->_nodes[$key] = new Doctrine_ORM_Internal_CommitOrderNode($item, $this);
$this->_nodes[$key] = new CommitOrderNode($item, $this);
}
/**
......
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\ORM\Internal;
namespace Doctrine\ORM\Internal;
/**
* A CommitOrderNode is a temporary wrapper around ClassMetadata instances
......@@ -28,7 +28,7 @@
* @since 2.0
* @author Roman Borschel <roman@code-factory.org>
*/
class Doctrine_ORM_Internal_CommitOrderNode
class CommitOrderNode
{
const NOT_VISITED = 1;
const IN_PROGRESS = 2;
......@@ -55,7 +55,7 @@ class Doctrine_ORM_Internal_CommitOrderNode
* @param mixed $wrappedObj The object to wrap.
* @param Doctrine\ORM\Internal\CommitOrderCalculator $calc The calculator.
*/
public function __construct($wrappedObj, Doctrine_ORM_Internal_CommitOrderCalculator $calc)
public function __construct($wrappedObj, CommitOrderCalculator $calc)
{
$this->_wrappedObj = $wrappedObj;
$this->_calculator = $calc;
......@@ -157,7 +157,7 @@ class Doctrine_ORM_Internal_CommitOrderNode
*
* @param Doctrine\ORM\Internal\CommitOrderNode $node
*/
public function before(Doctrine_ORM_Internal_CommitOrderNode $node)
public function before(CommitOrderNode $node)
{
$this->_relatedNodes[] = $node;
}
......
......@@ -19,7 +19,9 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\ORM\Internal\Hydration;
namespace Doctrine\ORM\Internal\Hydration;
use \PDO;
/**
* Base class for all hydrators (ok, we got only 1 currently).
......@@ -31,7 +33,7 @@
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @author Roman Borschel <roman@code-factory.org>
*/
abstract class Doctrine_ORM_Internal_Hydration_AbstractHydrator
abstract class AbstractHydrator
{
/**
* @var array $_queryComponents
......@@ -69,7 +71,7 @@ abstract class Doctrine_ORM_Internal_Hydration_AbstractHydrator
*
* @param Doctrine\ORM\EntityManager $em The EntityManager to use.
*/
public function __construct(Doctrine_ORM_EntityManager $em)
public function __construct(\Doctrine\ORM\EntityManager $em)
{
$this->_em = $em;
$this->_uow = $em->getUnitOfWork();
......@@ -86,7 +88,7 @@ abstract class Doctrine_ORM_Internal_Hydration_AbstractHydrator
{
$this->_stmt = $stmt;
$this->_prepare($parserResult);
return new Doctrine_ORM_Internal_Hydration_IterableResult($this);
return new IterableResult($this);
}
/**
......@@ -192,10 +194,10 @@ abstract class Doctrine_ORM_Internal_Hydration_AbstractHydrator
if ($this->_isIgnoredName($key)) continue;
// Cache general information like the column name <-> field name mapping
$e = explode(Doctrine_ORM_Query_ParserRule::SQLALIAS_SEPARATOR, $key);
$e = explode(\Doctrine\ORM\Query\ParserRule::SQLALIAS_SEPARATOR, $key);
$columnName = array_pop($e);
$cache[$key]['dqlAlias'] = $this->_tableAliases[
implode(Doctrine_ORM_Query_ParserRule::SQLALIAS_SEPARATOR, $e)
implode(\Doctrine\ORM\Query\ParserRule::SQLALIAS_SEPARATOR, $e)
];
$classMetadata = $this->_queryComponents[$cache[$key]['dqlAlias']]['metadata'];
// check whether it's an aggregate value or a regular field
......@@ -261,10 +263,10 @@ abstract class Doctrine_ORM_Internal_Hydration_AbstractHydrator
if ($this->_isIgnoredName($key)) continue;
// cache general information like the column name <-> field name mapping
$e = explode(Doctrine_ORM_Query_ParserRule::SQLALIAS_SEPARATOR, $key);
$e = explode(\Doctrine\ORM\Query\ParserRule::SQLALIAS_SEPARATOR, $key);
$columnName = array_pop($e);
$cache[$key]['dqlAlias'] = $this->_tableAliases[
implode(Doctrine_ORM_Query_ParserRule::SQLALIAS_SEPARATOR, $e)
implode(\Doctrine\ORM\Query\ParserRule::SQLALIAS_SEPARATOR, $e)
];
$classMetadata = $this->_queryComponents[$cache[$key]['dqlAlias']]['metadata'];
// check whether it's an aggregate value or a regular field
......
......@@ -4,12 +4,16 @@
* and open the template in the editor.
*/
namespace Doctrine\ORM\Internal\Hydration;
use \PDO;
/**
* Description of ArrayHydrator
*
* @author robo
*/
class Doctrine_ORM_Internal_Hydration_ArrayHydrator extends Doctrine_ORM_Internal_Hydration_AbstractHydrator
class ArrayHydrator extends AbstractHydrator
{
private $_rootAlias;
private $_rootEntityName;
......
<?php
namespace Doctrine\ORM\Internal\Hydration;
/**
* Represents a result structure that can be iterated over, hydrating row-by-row
* during the iteration. An IterableResult is obtained by AbstractHydrator#iterate().
......@@ -6,7 +9,7 @@
* @author robo
* @since 2.0
*/
class Doctrine_ORM_Internal_Hydration_IterableResult
class IterableResult
{
private $_hydrator;
......
<?php
namespace Doctrine\ORM\Internal\Hydration;
use \PDO;
/**
* Description of ObjectHydrator
*
* @author robo
*/
class Doctrine_ORM_Internal_Hydration_ObjectHydrator extends Doctrine_ORM_Internal_Hydration_AbstractHydrator
class ObjectHydrator extends AbstractHydrator
{
/** Collections initialized by the hydrator */
private $_collections = array();
......@@ -51,7 +54,7 @@ class Doctrine_ORM_Internal_Hydration_ObjectHydrator extends Doctrine_ORM_Intern
if ($this->_parserResult->isMixedQuery()) {
$result = array();
} else {
$result = new Doctrine_ORM_Collection($this->_em, $this->_rootEntityName);
$result = new \Doctrine\ORM\Collection($this->_em, $this->_rootEntityName);
}
$cache = array();
......@@ -102,7 +105,7 @@ class Doctrine_ORM_Internal_Hydration_ObjectHydrator extends Doctrine_ORM_Intern
if ( ! is_object($coll)) {
end($coll);
$this->_resultPointers[$dqlAlias] =& $coll[key($coll)];
} else if ($coll instanceof Doctrine_ORM_Collection) {
} else if ($coll instanceof \Doctrine\ORM\Collection) {
if (count($coll) > 0) {
$this->_resultPointers[$dqlAlias] = $coll->last();
}
......@@ -113,7 +116,7 @@ class Doctrine_ORM_Internal_Hydration_ObjectHydrator extends Doctrine_ORM_Intern
private function getCollection($component)
{
$coll = new Doctrine_ORM_Collection($this->_em, $component);
$coll = new \Doctrine\ORM\Collection($this->_em, $component);
$this->_collections[] = $coll;
return $coll;
}
......@@ -335,7 +338,7 @@ class Doctrine_ORM_Internal_Hydration_ObjectHydrator extends Doctrine_ORM_Intern
->getValue($baseElement));
}
} else if ( ! $this->isFieldSet($baseElement, $relationAlias)) {
$coll = new Doctrine_ORM_Collection($this->_em, $entityName);
$coll = new \Doctrine\ORM\Collection($this->_em, $entityName);
$this->_collections[] = $coll;
$this->setRelatedElement($baseElement, $relationAlias, $coll);
}
......@@ -370,7 +373,7 @@ class Doctrine_ORM_Internal_Hydration_ObjectHydrator extends Doctrine_ORM_Intern
/** {@inheritdoc} */
protected function _getRowContainer()
{
return new Doctrine_Common_Collections_Collection;
return new \Doctrine\Common\Collections\Collection;
}
}
<?php
namespace Doctrine\ORM\Internal\Hydration;
use \PDO;
/**
* Hydrator that produces flat, rectangular results of scalar data.
* The created result is almost the same as a regular SQL result set, except
......@@ -8,7 +12,7 @@
* @author robo
* @since 2.0
*/
class Doctrine_ORM_Internal_Hydration_ScalarHydrator extends Doctrine_ORM_Internal_Hydration_AbstractHydrator
class ScalarHydrator extends AbstractHydrator
{
/** @override */
protected function _hydrateAll()
......
......@@ -4,12 +4,17 @@
* and open the template in the editor.
*/
namespace Doctrine\ORM\Internal\Hydration;
use \PDO;
use Doctrine\ORM\Exceptions\HydrationException;
/**
* Description of SingleScalarHydrator
*
* @author robo
*/
class Doctrine_ORM_Internal_Hydration_SingleScalarHydrator extends Doctrine_ORM_Internal_Hydration_AbstractHydrator
class SingleScalarHydrator extends AbstractHydrator
{
/** @override */
protected function _hydrateAll()
......@@ -18,7 +23,7 @@ class Doctrine_ORM_Internal_Hydration_SingleScalarHydrator extends Doctrine_ORM_
$result = $this->_stmt->fetchAll(PDO::FETCH_ASSOC);
//TODO: Let this exception be raised by Query as QueryException
if (count($result) > 1 || count($result[0]) > 1) {
throw Doctrine_ORM_Exceptions_HydrationException::nonUniqueResult();
throw HydrationException::nonUniqueResult();
}
$result = $this->_gatherScalarRowData($result[0], $cache);
return array_shift($result);
......
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\ORM\Mapping;
namespace Doctrine\ORM\Mapping;
/**
* Base class for association mappings.
......@@ -27,7 +27,7 @@
* @author Roman Borschel <roman@code-factory.org>
* @since 2.0
*/
abstract class Doctrine_ORM_Mapping_AssociationMapping
abstract class AssociationMapping
{
const FETCH_MANUAL = 1;
const FETCH_LAZY = 2;
......
......@@ -19,9 +19,9 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\ORM\Mapping;
namespace Doctrine\ORM\Mapping;
#use \Serializable;
use \ReflectionClass;
/**
* A <tt>ClassMetadata</tt> instance holds all the information (metadata) of an entity and
......@@ -31,7 +31,7 @@
* @author Roman Borschel <roman@code-factory.org>
* @since 2.0
*/
class Doctrine_ORM_Mapping_ClassMetadata
class ClassMetadata
{
/* The inheritance mapping types */
/**
......@@ -613,7 +613,7 @@ class Doctrine_ORM_Mapping_ClassMetadata
}
if ( ! is_object($mapping['type'])) {
$mapping['type'] = Doctrine_DBAL_Types_Type::getType($mapping['type']);
$mapping['type'] = \Doctrine\DBAL\Types\Type::getType($mapping['type']);
}
// Complete fieldName and columnName mapping
......@@ -1186,12 +1186,12 @@ class Doctrine_ORM_Mapping_ClassMetadata
{
$this->_validateAndCompleteFieldMapping($mapping);
if (isset($this->_fieldMappings[$mapping['fieldName']])) {
throw Doctrine_ORM_Exceptions_MappingException::duplicateFieldMapping();
throw MappingException::duplicateFieldMapping();
}
$this->_fieldMappings[$mapping['fieldName']] = $mapping;
}
public function addAssociationMapping(Doctrine_ORM_Mapping_AssociationMapping $mapping)
public function addAssociationMapping(AssociationMapping $mapping)
{
$this->_storeAssociationMapping($mapping);
}
......@@ -1204,7 +1204,7 @@ class Doctrine_ORM_Mapping_ClassMetadata
public function mapOneToOne(array $mapping)
{
$mapping = $this->_completeAssociationMapping($mapping);
$oneToOneMapping = new Doctrine_ORM_Mapping_OneToOneMapping($mapping);
$oneToOneMapping = new OneToOneMapping($mapping);
$this->_storeAssociationMapping($oneToOneMapping);
}
......@@ -1215,7 +1215,7 @@ class Doctrine_ORM_Mapping_ClassMetadata
* @param AssociationMapping The mapping to register as inverse if it is a mapping
* for the inverse side of an association.
*/
private function _registerMappingIfInverse(Doctrine_ORM_Mapping_AssociationMapping $assoc)
private function _registerMappingIfInverse(AssociationMapping $assoc)
{
if ($assoc->isInverseSide()) {
$this->_inverseMappings[$assoc->getMappedByFieldName()] = $assoc;
......@@ -1230,7 +1230,7 @@ class Doctrine_ORM_Mapping_ClassMetadata
public function mapOneToMany(array $mapping)
{
$mapping = $this->_completeAssociationMapping($mapping);
$oneToManyMapping = new Doctrine_ORM_Mapping_OneToManyMapping($mapping);
$oneToManyMapping = new OneToManyMapping($mapping);
$this->_storeAssociationMapping($oneToManyMapping);
}
......@@ -1253,7 +1253,7 @@ class Doctrine_ORM_Mapping_ClassMetadata
public function mapManyToMany(array $mapping)
{
$mapping = $this->_completeAssociationMapping($mapping);
$manyToManyMapping = new Doctrine_ORM_Mapping_ManyToManyMapping($mapping);
$manyToManyMapping = new ManyToManyMapping($mapping);
$this->_storeAssociationMapping($manyToManyMapping);
}
......@@ -1262,11 +1262,11 @@ class Doctrine_ORM_Mapping_ClassMetadata
*
* @param Doctrine_Association $assocMapping
*/
private function _storeAssociationMapping(Doctrine_ORM_Mapping_AssociationMapping $assocMapping)
private function _storeAssociationMapping(AssociationMapping $assocMapping)
{
$sourceFieldName = $assocMapping->getSourceFieldName();
if (isset($this->_associationMappings[$sourceFieldName])) {
throw Doctrine_ORM_Exceptions_MappingException::duplicateFieldMapping();
throw MappingException::duplicateFieldMapping();
}
$this->_associationMappings[$sourceFieldName] = $assocMapping;
$this->_registerMappingIfInverse($assocMapping);
......@@ -1343,7 +1343,7 @@ class Doctrine_ORM_Mapping_ClassMetadata
* @param string $event The lifecycle event.
* @param Entity $entity The Entity on which the event occured.
*/
public function invokeLifecycleCallbacks($lifecycleEvent, Doctrine_ORM_Entity $entity)
public function invokeLifecycleCallbacks($lifecycleEvent, $entity)
{
foreach ($this->getLifecycleCallbacks($lifecycleEvent) as $callback) {
$entity->$callback();
......
......@@ -19,9 +19,9 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\ORM\Mapping;
namespace Doctrine\ORM\Mapping;
#use Doctrine\DBAL\Platforms\AbstractPlatform;
use Doctrine\DBAL\Platforms\AbstractPlatform;
/**
* The metadata factory is used to create ClassMetadata objects that contain all the
......@@ -35,7 +35,7 @@
* @link www.doctrine-project.org
* @since 2.0
*/
class Doctrine_ORM_Mapping_ClassMetadataFactory
class ClassMetadataFactory
{
/** The targeted database platform. */
private $_targetPlatform;
......@@ -47,7 +47,7 @@ class Doctrine_ORM_Mapping_ClassMetadataFactory
*
* @param $driver The metadata driver to use.
*/
public function __construct($driver, Doctrine_DBAL_Platforms_AbstractPlatform $targetPlatform)
public function __construct($driver, AbstractPlatform $targetPlatform)
{
$this->_driver = $driver;
$this->_targetPlatform = $targetPlatform;
......@@ -161,7 +161,7 @@ class Doctrine_ORM_Mapping_ClassMetadataFactory
*/
protected function _newClassMetadataInstance($className)
{
return new Doctrine_ORM_Mapping_ClassMetadata($className);
return new ClassMetadata($className);
}
/**
......@@ -199,10 +199,10 @@ class Doctrine_ORM_Mapping_ClassMetadataFactory
* @param Doctrine_ClassMetadata $class The container for the metadata.
* @param string $name The name of the class for which the metadata will be loaded.
*/
private function _loadClassMetadata(Doctrine_ORM_Mapping_ClassMetadata $class, $name)
private function _loadClassMetadata(ClassMetadata $class, $name)
{
if ( ! class_exists($name) || empty($name)) {
throw new Doctrine_Exception("Couldn't find class " . $name . ".");
throw new DoctrineException("Couldn't find class " . $name . ".");
}
$names = array();
......@@ -224,13 +224,13 @@ class Doctrine_ORM_Mapping_ClassMetadataFactory
// Complete Id generator mapping. If AUTO is specified we choose the generator
// most appropriate for the target platform.
if ($class->getIdGeneratorType() == Doctrine_ORM_Mapping_ClassMetadata::GENERATOR_TYPE_AUTO) {
if ($class->getIdGeneratorType() == \Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_AUTO) {
if ($this->_targetPlatform->prefersSequences()) {
$class->setIdGeneratorType(Doctrine_ORM_Mapping_ClassMetadata::GENERATOR_TYPE_SEQUENCE);
$class->setIdGeneratorType(\Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_SEQUENCE);
} else if ($this->_targetPlatform->prefersIdentityColumns()) {
$class->setIdGeneratorType(Doctrine_ORM_Mapping_ClassMetadata::GENERATOR_TYPE_IDENTITY);
$class->setIdGeneratorType(\Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_IDENTITY);
} else {
$class->setIdGeneratorType(Doctrine_ORM_Mapping_ClassMetadata::GENERATOR_TYPE_TABLE);
$class->setIdGeneratorType(\Doctrine\ORM\Mapping\ClassMetadata::GENERATOR_TYPE_TABLE);
}
}
......
<?php
#namespace Doctrine\ORM\Mapping\Driver;
namespace Doctrine\ORM\Mapping\Driver;
use Doctrine\ORM\Exceptions\MappingException;
/* Addendum annotation reflection extensions */
if ( ! class_exists('Addendum', false)) {
require_once dirname(__FILE__) . '/addendum/annotations.php';
if ( ! class_exists('\Addendum', false)) {
require dirname(__FILE__) . '/addendum/annotations.php';
}
require dirname(__FILE__) . '/DoctrineAnnotations.php';
/**
* The AnnotationDriver reads the mapping metadata from docblock annotations.
*
* @author robo
*/
class Doctrine_ORM_Mapping_Driver_AnnotationDriver {
class AnnotationDriver
{
/**
* Loads the metadata for the specified class into the provided container.
*/
public function loadMetadataForClass($className, Doctrine_ORM_Mapping_ClassMetadata $metadata)
public function loadMetadataForClass($className, \Doctrine\ORM\Mapping\ClassMetadata $metadata)
{
$annotClass = new ReflectionAnnotatedClass($className);
$annotClass = new \Addendum\ReflectionAnnotatedClass($className);
if (($entityAnnot = $annotClass->getAnnotation('DoctrineEntity')) === false) {
throw new Doctrine_ORM_Exceptions_MappingException("$className is no entity.");
throw new MappingException("$className is no entity.");
}
if ($entityAnnot->tableName) {
......@@ -54,7 +58,7 @@ class Doctrine_ORM_Mapping_Driver_AnnotationDriver {
$mapping['fieldName'] = $property->getName();
if ($columnAnnot = $property->getAnnotation('DoctrineColumn')) {
if ($columnAnnot->type == null) {
throw new Doctrine_ORM_Exceptions_MappingException("Missing type on property " . $property->getName());
throw new MappingException("Missing type on property " . $property->getName());
}
$mapping['type'] = $columnAnnot->type;
$mapping['length'] = $columnAnnot->length;
......@@ -91,59 +95,3 @@ class Doctrine_ORM_Mapping_Driver_AnnotationDriver {
}
}
}
/* Annotations */
final class DoctrineEntity extends Annotation {
public $tableName;
public $repositoryClass;
public $inheritanceType;
}
final class DoctrineInheritanceType extends Annotation {}
final class DoctrineDiscriminatorColumn extends Annotation {
public $name;
public $type;
public $length;
}
final class DoctrineDiscriminatorMap extends Annotation {}
final class DoctrineSubClasses extends Annotation {}
final class DoctrineId extends Annotation {}
final class DoctrineIdGenerator extends Annotation {}
final class DoctrineVersion extends Annotation {}
final class DoctrineJoinColumn extends Annotation {
public $name;
public $type;
public $length;
public $onDelete;
public $onUpdate;
}
final class DoctrineColumn extends Annotation {
public $type;
public $length;
public $unique;
public $nullable;
}
final class DoctrineOneToOne extends Annotation {
public $targetEntity;
public $mappedBy;
public $joinColumns;
public $cascade;
}
final class DoctrineOneToMany extends Annotation {
public $mappedBy;
public $targetEntity;
public $cascade;
}
final class DoctrineManyToOne extends Annotation {
public $targetEntity;
public $joinColumns;
public $cascade;
}
final class DoctrineManyToMany extends Annotation {
public $targetEntity;
public $joinColumns;
public $inverseJoinColumns;
public $joinTable;
public $mappedBy;
public $cascade;
}
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
/* Annotations */
final class DoctrineEntity extends \Addendum\Annotation {
public $tableName;
public $repositoryClass;
public $inheritanceType;
}
final class DoctrineInheritanceType extends \Addendum\Annotation {}
final class DoctrineDiscriminatorColumn extends \Addendum\Annotation {
public $name;
public $type;
public $length;
}
final class DoctrineDiscriminatorMap extends \Addendum\Annotation {}
final class DoctrineSubClasses extends \Addendum\Annotation {}
final class DoctrineId extends \Addendum\Annotation {}
final class DoctrineIdGenerator extends \Addendum\Annotation {}
final class DoctrineVersion extends \Addendum\Annotation {}
final class DoctrineJoinColumn extends \Addendum\Annotation {
public $name;
public $type;
public $length;
public $onDelete;
public $onUpdate;
}
final class DoctrineColumn extends \Addendum\Annotation {
public $type;
public $length;
public $unique;
public $nullable;
}
final class DoctrineOneToOne extends \Addendum\Annotation {
public $targetEntity;
public $mappedBy;
public $joinColumns;
public $cascade;
}
final class DoctrineOneToMany extends \Addendum\Annotation {
public $mappedBy;
public $targetEntity;
public $cascade;
}
final class DoctrineManyToOne extends \Addendum\Annotation {
public $targetEntity;
public $joinColumns;
public $cascade;
}
final class DoctrineManyToMany extends \Addendum\Annotation {
public $targetEntity;
public $joinColumns;
public $inverseJoinColumns;
public $joinTable;
public $mappedBy;
public $cascade;
}
......@@ -20,6 +20,12 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**/
namespace Addendum;
use \ReflectionClass;
use \ReflectionMethod;
use \ReflectionProperty;
require_once(dirname(__FILE__).'/annotations/annotation_parser.php');
class Annotation {
......@@ -75,7 +81,7 @@ class AnnotationsBuilder {
$data = $this->parse($targetReflection);
$annotations = array();
foreach($data as $class => $parameters) {
if(is_subclass_of($class, 'Annotation')) {
if(is_subclass_of($class, '\Addendum\Annotation')) {
foreach($parameters as $params) {
$annotationReflection = new ReflectionClass($class);
$annotations[$class][] = $annotationReflection->newInstance($params, $targetReflection);
......@@ -310,7 +316,7 @@ class Addendum {
/** Raw mode test */
private static function checkRawDocCommentParsingNeeded() {
if(self::$rawMode === null) {
$reflection = new ReflectionClass('Addendum');
$reflection = new ReflectionClass('\Addendum\Addendum');
$method = $reflection->getMethod('checkRawDocCommentParsingNeeded');
self::setRawMode($method->getDocComment() === false);
}
......
......@@ -20,6 +20,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
**/
namespace Addendum;
class CompositeMatcher {
protected $matchers = array();
private $wasConstructed = false;
......@@ -332,4 +334,4 @@
return $matches[1];
}
}
?>
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\ORM\Mapping;
namespace Doctrine\ORM\Mapping;
/**
* Represents a one-to-many mapping.
......@@ -31,9 +31,8 @@
*
* @author Roman Borschel <roman@code-factory.org>
* @since 2.0
* @todo Rename to OneToManyMapping
*/
class Doctrine_ORM_Mapping_OneToManyMapping extends Doctrine_ORM_Mapping_AssociationMapping
class OneToManyMapping extends AssociationMapping
{
/** The target foreign key columns that reference the sourceKeyColumns. */
/* NOTE: Currently not used because uni-directional one-many not supported atm. */
......
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\ORM\Mappings;
namespace Doctrine\ORM\Mapping;
/**
* A one-to-one mapping describes a uni-directional mapping from one entity
......@@ -28,7 +28,7 @@
* @since 2.0
* @author Roman Borschel <roman@code-factory.org>
*/
class Doctrine_ORM_Mapping_OneToOneMapping extends Doctrine_ORM_Mapping_AssociationMapping
class OneToOneMapping extends AssociationMapping
{
/**
* Maps the source foreign/primary key columns to the target primary/foreign key columns.
......
......@@ -19,7 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\ORM\Persisters;
namespace Doctrine\ORM\Persisters;
/**
* Base class for all EntityPersisters.
......@@ -27,11 +27,10 @@
* @author Roman Borschel <roman@code-factory.org>
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @version $Revision: 3406 $
* @link www.phpdoctrine.org
* @link www.doctrine-project.org
* @since 2.0
* @todo Rename to AbstractEntityPersister
*/
abstract class Doctrine_ORM_Persisters_AbstractEntityPersister
abstract class AbstractEntityPersister
{
/**
* The names of all the fields that are available on entities.
......@@ -71,7 +70,7 @@ abstract class Doctrine_ORM_Persisters_AbstractEntityPersister
* that uses the given EntityManager and persists instances of the class described
* by the given class metadata descriptor.
*/
public function __construct(Doctrine_ORM_EntityManager $em, Doctrine_ORM_Mapping_ClassMetadata $classMetadata)
public function __construct(\Doctrine\ORM\EntityManager $em, \Doctrine\ORM\Mapping\ClassMetadata $classMetadata)
{
$this->_em = $em;
$this->_entityName = $classMetadata->getClassName();
......
......@@ -19,9 +19,7 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\ORM\Persisters;
#use Doctrine\ORM\Entity;
namespace Doctrine\ORM\Persisters;
/**
* The default persister strategy maps a single entity instance to a single database table,
......@@ -33,12 +31,12 @@
* @link www.doctrine-project.org
* @since 2.0
*/
class Doctrine_ORM_Persisters_StandardEntityPersister extends Doctrine_ORM_Persisters_AbstractEntityPersister
class StandardEntityPersister extends AbstractEntityPersister
{
/**
* Deletes an entity.
*/
protected function _doDelete(Doctrine_ORM_Entity $record)
protected function _doDelete($record)
{
/*try {
$this->_conn->beginInternalTransaction();
......
......@@ -20,12 +20,14 @@
* <http://www.phpdoctrine.org>.
*/
#namespace Doctrine\ORM;
namespace Doctrine\ORM;
use Doctrine\ORM\Query\Parser;
/**
* A Doctrine_ORM_Query object represents a DQL query. It is used to query databases for
* data in an object-oriented fashion. A DQL query understands relations and inheritance
* and is dbms independant.
* and is to a large degree dbms independant.
*
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.doctrine-project.org
......@@ -35,7 +37,7 @@
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
* @author Roman Borschel <roman@code-factory.org>
*/
class Doctrine_ORM_Query extends Doctrine_ORM_Query_Abstract
class Query extends AbstractQuery
{
/* Hydration mode constants */
/**
......@@ -122,7 +124,7 @@ class Doctrine_ORM_Query extends Doctrine_ORM_Query_Abstract
*
* @param Doctrine\ORM\EntityManager $entityManager
*/
public function __construct(Doctrine_ORM_EntityManager $entityManager)
public function __construct(EntityManager $entityManager)
{
$this->_entityManager = $entityManager;
$this->free();
......@@ -165,7 +167,7 @@ class Doctrine_ORM_Query extends Doctrine_ORM_Query_Abstract
return false;
}
if ($collection instanceof Doctrine_ORM_Collection) {
if ($collection instanceof Collection) {
return $collection->getFirst();
} else if (is_array($collection)) {
return array_shift($collection);
......@@ -208,7 +210,7 @@ class Doctrine_ORM_Query extends Doctrine_ORM_Query_Abstract
public function parse()
{
if ($this->_state === self::STATE_DIRTY) {
$parser = new Doctrine_ORM_Query_Parser($this);
$parser = new Parser($this);
$this->_parserResult = $parser->parse();
$this->_state = self::STATE_CLEAN;
}
......@@ -243,13 +245,13 @@ class Doctrine_ORM_Query extends Doctrine_ORM_Query_Abstract
if ($cached === false) {
// Cache does not exist, we have to create it.
$result = $this->_execute($params, self::HYDRATE_ARRAY);
$queryResult = Doctrine_ORM_Query_CacheHandler::fromResultSet($this, $result);
$queryResult = \Doctrine\ORM\Query\CacheHandler::fromResultSet($this, $result);
$cacheDriver->save($hash, $queryResult->toCachedForm(), $this->_resultCacheTTL);
return $result;
} else {
// Cache exists, recover it and return the results.
$queryResult = Doctrine_ORM_Query_CacheHandler::fromCachedResult($this, $cached);
$queryResult = \Doctrine\ORM\Query\CacheHandler::fromCachedResult($this, $cached);
return $queryResult->getResultSet();
}
......@@ -288,7 +290,7 @@ class Doctrine_ORM_Query extends Doctrine_ORM_Query_Abstract
$cacheDriver->save($hash, $this->_parserResult->toCachedForm(), $this->_queryCacheTTL);
} else {
// Cache exists, recover it and return the results.
$this->_parserResult = Doctrine_ORM_Query_CacheHandler::fromCachedQuery($this, $cached);
$this->_parserResult = Doctrine\ORM\Query\CacheHandler::fromCachedQuery($this, $cached);
$executor = $this->_parserResult->getSqlExecutor();
}
......@@ -333,8 +335,8 @@ class Doctrine_ORM_Query extends Doctrine_ORM_Query_Abstract
*/
public function setResultCache($resultCache)
{
if ($resultCache !== null && ! ($resultCache instanceof Doctrine_ORM_Cache_Cache)) {
throw new Doctrine_ORM_Query_Exception(
if ($resultCache !== null && ! ($resultCache instanceof \Doctrine\ORM\Cache\Cache)) {
throw new DoctrineException(
'Method setResultCache() accepts only an instance of Doctrine_Cache_Interface or null.'
);
}
......@@ -350,7 +352,7 @@ class Doctrine_ORM_Query extends Doctrine_ORM_Query_Abstract
*/
public function getResultCache()
{
if ($this->_resultCache instanceof Doctrine_ORM_Cache_Cache) {
if ($this->_resultCache instanceof \Doctrine\ORM\Cache\Cache) {
return $this->_resultCache;
} else {
return $this->_entityManager->getConnection()->getResultCacheDriver();
......@@ -415,8 +417,8 @@ class Doctrine_ORM_Query extends Doctrine_ORM_Query_Abstract
*/
public function setQueryCache($queryCache)
{
if ($queryCache !== null && ! ($queryCache instanceof Doctrine_ORM_Cache_Cache)) {
throw new Doctrine_ORM_Query_Exception(
if ($queryCache !== null && ! ($queryCache instanceof \Doctrine\ORM\Cache\Cache)) {
throw new DoctrineException(
'Method setResultCache() accepts only an instance of Doctrine_ORM_Cache_Interface or null.'
);
}
......@@ -433,7 +435,7 @@ class Doctrine_ORM_Query extends Doctrine_ORM_Query_Abstract
*/
public function getQueryCache()
{
if ($this->_queryCache instanceof Doctrine_ORM_Cache_Cache) {
if ($this->_queryCache instanceof \Doctrine\ORM\Cache\Cache) {
return $this->_queryCache;
} else {
return $this->_entityManager->getConnection()->getQueryCacheDriver();
......@@ -529,7 +531,7 @@ class Doctrine_ORM_Query extends Doctrine_ORM_Query_Abstract
{
$result = $this->execute(array(), $hydrationMode);
if (count($result) > 1) {
throw Doctrine_ORM_Query_Exception::nonUniqueResult();
throw QueryException::nonUniqueResult();
}
return is_array($result) ? array_shift($result) : $result->getFirst();
......
......@@ -4,12 +4,14 @@
* and open the template in the editor.
*/
namespace Doctrine\ORM\Query\AST;
/**
* Description of AggregateExpression
*
* @author robo
*/
class Doctrine_ORM_Query_AST_AggregateExpression extends Doctrine_ORM_Query_AST
class AggregateExpression extends Node
{
private $_functionName;
private $_pathExpression;
......
......@@ -4,12 +4,14 @@
* and open the template in the editor.
*/
namespace Doctrine\ORM\Query\AST;
/**
* ArithmeticExpression ::= SimpleArithmeticExpression | "(" Subselect ")"
*
* @author robo
*/
class Doctrine_ORM_Query_AST_ArithmeticExpression extends Doctrine_ORM_Query_AST
class ArithmeticExpression extends Node
{
private $_simpleArithmeticExpression;
private $_subselect;
......
......@@ -4,12 +4,14 @@
* and open the template in the editor.
*/
namespace Doctrine\ORM\Query\AST;
/**
* ArithmeticFactor ::= [("+" | "-")] ArithmeticPrimary
*
* @author robo
*/
class Doctrine_ORM_Query_AST_ArithmeticFactor extends Doctrine_ORM_Query_AST
class ArithmeticFactor extends Node
{
private $_arithmeticPrimary;
private $_pSigned;
......
......@@ -4,12 +4,14 @@
* and open the template in the editor.
*/
namespace Doctrine\ORM\Query\AST;
/**
* ArithmeticTerm ::= ArithmeticFactor {("*" | "/") ArithmeticFactor}*
*
* @author robo
*/
class Doctrine_ORM_Query_AST_ArithmeticTerm extends Doctrine_ORM_Query_AST
class ArithmeticTerm extends Node
{
private $_factors;
......
......@@ -4,6 +4,8 @@
* and open the template in the editor.
*/
namespace Doctrine\ORM\Query\AST;
/**
* ComparisonExpression ::= ArithmeticExpression ComparisonOperator ( QuantifiedExpression | ArithmeticExpression ) |
* StringExpression ComparisonOperator (StringExpression | QuantifiedExpression) |
......@@ -14,7 +16,7 @@
*
* @author robo
*/
class Doctrine_ORM_Query_AST_ComparisonExpression extends Doctrine_ORM_Query_AST
class ComparisonExpression extends Node
{
private $_leftExpr;
private $_rightExpr;
......
......@@ -19,6 +19,8 @@
* <http://www.phpdoctrine.org>.
*/
namespace Doctrine\ORM\Query\AST;
/**
* ComparisonOperator = "=" | "<" | "<=" | "<>" | ">" | ">=" | "!="
*
......@@ -31,7 +33,7 @@
* @since 2.0
* @version $Revision$
*/
class Doctrine_ORM_Query_AST_ComparisonOperator extends Doctrine_ORM_Query_AST
class ComparisonOperator extends Node
{
}
......@@ -4,12 +4,14 @@
* and open the template in the editor.
*/
namespace Doctrine\ORM\Query\AST;
/**
* ConditionalExpression ::= ConditionalTerm {"OR" ConditionalTerm}*
*
* @author robo
*/
class Doctrine_ORM_Query_AST_ConditionalExpression extends Doctrine_ORM_Query_AST
class ConditionalExpression extends Node
{
private $_conditionalTerms = array();
......
......@@ -4,12 +4,14 @@
* and open the template in the editor.
*/
namespace Doctrine\ORM\Query\AST;
/**
* ConditionalFactor ::= ["NOT"] ConditionalPrimary
*
* @author robo
*/
class Doctrine_ORM_Query_AST_ConditionalFactor extends Doctrine_ORM_Query_AST
class ConditionalFactor extends Node
{
private $_not = false;
private $_conditionalPrimary;
......
......@@ -4,12 +4,14 @@
* and open the template in the editor.
*/
namespace Doctrine\ORM\Query\AST;
/**
* ConditionalPrimary ::= SimpleConditionalExpression | "(" ConditionalExpression ")"
*
* @author robo
*/
class Doctrine_ORM_Query_AST_ConditionalPrimary extends Doctrine_ORM_Query_AST
class ConditionalPrimary extends Node
{
private $_simpleConditionalExpression;
private $_conditionalExpression;
......
......@@ -4,12 +4,14 @@
* and open the template in the editor.
*/
namespace Doctrine\ORM\Query\AST;
/**
* ConditionalTerm ::= ConditionalFactor {"AND" ConditionalFactor}*
*
* @author robo
*/
class Doctrine_ORM_Query_AST_ConditionalTerm extends Doctrine_ORM_Query_AST
class ConditionalTerm extends Node
{
private $_conditionalFactors = array();
......
......@@ -19,6 +19,8 @@
* <http://www.phpdoctrine.org>.
*/
namespace Doctrine\ORM\Query\AST;
/**
* DeleteStatement = DeleteClause [WhereClause]
*
......@@ -28,7 +30,7 @@
* @since 2.0
* @version $Revision$
*/
class Doctrine_ORM_Query_AST_DeleteStatement extends Doctrine_ORM_Query_AST
class DeleteStatement extends Node
{
protected $_deleteClause;
......
......@@ -19,6 +19,8 @@
* <http://www.phpdoctrine.org>.
*/
namespace Doctrine\ORM\Query\AST;
/**
* FromClause ::= "FROM" IdentificationVariableDeclaration {"," IdentificationVariableDeclaration}
*
......@@ -28,7 +30,7 @@
* @since 2.0
* @version $Revision$
*/
class Doctrine_ORM_Query_AST_FromClause extends Doctrine_ORM_Query_AST
class FromClause extends Node
{
protected $_identificationVariableDeclarations = array();
......
<?php
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
namespace Doctrine\ORM\Query\AST;
/**
* Description of Function
*
* @author robo
*/
class FunctionNode extends Node
{
private $_name;
}
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment