Commit f556ee8c authored by romanb's avatar romanb

moved Null/Type/Platform

parent 4d7b8838
......@@ -59,7 +59,7 @@ class Doctrine_Configuration
*/
public function __construct()
{
$this->_nullObject = Doctrine_Null::$INSTANCE;
$this->_nullObject = Doctrine_ORM_Internal_Null::$INSTANCE;
$this->_initAttributes();
}
......
......@@ -2,7 +2,7 @@
#namespace Doctrine::DBAL::Types;
abstract class Doctrine_DataType
abstract class Doctrine_DBAL_Types_Type
{
private static $_typeObjects = array();
private static $_typesMap = array(
......
This diff is collapsed.
......@@ -238,7 +238,7 @@ abstract class Doctrine_Entity implements ArrayAccess, Serializable
// Single field identifier
$name = $this->_class->getIdentifier();
$name = $name[0];
if (isset($this->_data[$name]) && $this->_data[$name] !== Doctrine_Null::$INSTANCE) {
if (isset($this->_data[$name]) && $this->_data[$name] !== Doctrine_ORM_Internal_Null::$INSTANCE) {
$this->_id[$name] = $this->_data[$name];
}
} else {
......@@ -391,7 +391,7 @@ abstract class Doctrine_Entity implements ArrayAccess, Serializable
*/
final protected function _get($fieldName)
{
$nullObj = Doctrine_Null::$INSTANCE;
$nullObj = Doctrine_ORM_Internal_Null::$INSTANCE;
if (isset($this->_data[$fieldName])) {
return $this->_data[$fieldName] !== $nullObj ?
$this->_data[$fieldName] : null;
......@@ -481,7 +481,7 @@ abstract class Doctrine_Entity implements ArrayAccess, Serializable
*/
final public function _internalGetField($fieldName)
{
if ($this->_data[$fieldName] === Doctrine_Null::$INSTANCE) {
if ($this->_data[$fieldName] === Doctrine_ORM_Internal_Null::$INSTANCE) {
return null;
}
return $this->_data[$fieldName];
......@@ -514,7 +514,7 @@ abstract class Doctrine_Entity implements ArrayAccess, Serializable
*/
final public function _internalGetReference($fieldName)
{
if ($this->_references[$fieldName] === Doctrine_Null::$INSTANCE) {
if ($this->_references[$fieldName] === Doctrine_ORM_Internal_Null::$INSTANCE) {
return null;
}
return $this->_references[$fieldName];
......@@ -534,7 +534,7 @@ abstract class Doctrine_Entity implements ArrayAccess, Serializable
*/
final public function _internalSetReference($name, $value, $completeBidirectional = false)
{
if (is_null($value) || $value === Doctrine_Null::$INSTANCE) {
if (is_null($value) || $value === Doctrine_ORM_Internal_Null::$INSTANCE) {
$this->_references[$name] = $value;
return; // early exit!
}
......@@ -678,7 +678,7 @@ abstract class Doctrine_Entity implements ArrayAccess, Serializable
private function _contains($fieldName)
{
if (isset($this->_data[$fieldName])) {
if ($this->_data[$fieldName] === Doctrine_Null::$INSTANCE) {
if ($this->_data[$fieldName] === Doctrine_ORM_Internal_Null::$INSTANCE) {
return false;
}
return true;
......@@ -687,7 +687,7 @@ abstract class Doctrine_Entity implements ArrayAccess, Serializable
return true;
}
if (isset($this->_references[$fieldName]) &&
$this->_references[$fieldName] !== Doctrine_Null::$INSTANCE) {
$this->_references[$fieldName] !== Doctrine_ORM_Internal_Null::$INSTANCE) {
return true;
}
return false;
......
......@@ -158,7 +158,7 @@ class Doctrine_EntityManager
$this->_metadataFactory = new Doctrine_ClassMetadata_Factory(
$this, new Doctrine_ClassMetadata_CodeDriver());
$this->_unitOfWork = new Doctrine_Connection_UnitOfWork($this);
$this->_nullObject = Doctrine_Null::$INSTANCE;
$this->_nullObject = Doctrine_ORM_Internal_Null::$INSTANCE;
}
/**
......
......@@ -80,7 +80,7 @@ abstract class Doctrine_EntityPersister_Abstract
$this->_entityName = $classMetadata->getClassName();
$this->_conn = $em->getConnection();
$this->_classMetadata = $classMetadata;
$this->_nullObject = Doctrine_Null::$INSTANCE;
$this->_nullObject = Doctrine_ORM_Internal_Null::$INSTANCE;
}
/**
......@@ -287,7 +287,7 @@ abstract class Doctrine_EntityPersister_Abstract
$type = $entity->getClass()->getTypeOfField($field);
$columnName = $entity->getClass()->getColumnName($field);
if ($newVal === Doctrine_Null::$INSTANCE) {
if ($newVal === Doctrine_ORM_Internal_Null::$INSTANCE) {
$result[$columnName] = null;
continue;
}
......
......@@ -67,7 +67,7 @@ abstract class Doctrine_Hydrator_Abstract
public function __construct(Doctrine_EntityManager $em)
{
$this->_em = $em;
$this->_nullObject = Doctrine_Null::$INSTANCE;
$this->_nullObject = Doctrine_ORM_Internal_Null::$INSTANCE;
}
/**
......
......@@ -43,7 +43,7 @@ class Doctrine_Hydrator_RecordDriver
public function __construct(Doctrine_EntityManager $em)
{
$this->_nullObject = Doctrine_Null::$INSTANCE;
$this->_nullObject = Doctrine_ORM_Internal_Null::$INSTANCE;
$this->_em = $em;
}
......
<?php
/*
* $Id$
* $Id: Null.php 4723 2008-08-01 18:46:14Z romanb $
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
......@@ -37,12 +37,12 @@
* @license http://www.opensource.org/licenses/lgpl-license.php LGPL
* @link www.phpdoctrine.org
* @since 1.0
* @version $Revision$
* @version $Revision: 4723 $
* @author Konsta Vesterinen <kvesteri@cc.hut.fi>
*/
// static initializer
Doctrine_Null::$INSTANCE = new Doctrine_Null();
final class Doctrine_Null
Doctrine_ORM_Internal_Null::$INSTANCE = new Doctrine_ORM_Internal_Null();
final class Doctrine_ORM_Internal_Null
{
public static $INSTANCE;
public function __construct() {}
......
<?php
class Doctrine_DatabasePlatformMock extends Doctrine_DatabasePlatform
class Doctrine_DatabasePlatformMock extends Doctrine_DBAL_Platforms_AbstractPlatform
{
private $_prefersIdentityColumns = false;
......
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