1
0
mirror of synced 2025-01-18 22:41:43 +03:00

Removed support for experimental C extension. Will be re-examined for 3.0.

This commit is contained in:
Roman S. Borschel 2010-08-08 12:52:46 +02:00
parent 3630e06b84
commit 34262aeae1
2 changed files with 3 additions and 40 deletions

View File

@ -239,29 +239,6 @@ class Configuration extends \Doctrine\DBAL\Configuration
$this->_attributes['metadataCacheImpl'] = $cacheImpl;
}
/**
* Gets a boolean flag that indicates whether Doctrine should make use of the
* C extension.
*
* @return boolean TRUE if Doctrine is configured to use the C extension, FALSE otherwise.
*/
public function getUseCExtension()
{
return isset($this->_attributes['useCExtension']) ?
$this->_attributes['useCExtension'] : false;
}
/**
* Sets a boolean flag that indicates whether Doctrine should make use of the
* C extension.
*
* @param boolean $boolean Whether to make use of the C extension or not.
*/
public function setUseCExtension($boolean)
{
$this->_attributes['useCExtension'] = $boolean;
}
/**
* Adds a named DQL query to the configuration.
*

View File

@ -200,15 +200,6 @@ class UnitOfWork implements PropertyChangedListener
* @var array
*/
private $collectionPersisters = array();
/**
* EXPERIMENTAL:
* Flag for whether or not to make use of the C extension which is an experimental
* library that aims to improve the performance of some critical code sections.
*
* @var boolean
*/
private $useCExtension = false;
/**
* The EventManager used for dispatching events.
@ -235,7 +226,6 @@ class UnitOfWork implements PropertyChangedListener
{
$this->em = $em;
$this->evm = $em->getEventManager();
$this->useCExtension = $this->em->getConfiguration()->getUseCExtension();
}
/**
@ -1866,13 +1856,9 @@ class UnitOfWork implements PropertyChangedListener
}
if ($overrideLocalValues) {
if ($this->useCExtension) {
doctrine_populate_data($entity, $data);
} else {
foreach ($data as $field => $value) {
if (isset($class->fieldMappings[$field])) {
$class->reflFields[$field]->setValue($entity, $value);
}
foreach ($data as $field => $value) {
if (isset($class->fieldMappings[$field])) {
$class->reflFields[$field]->setValue($entity, $value);
}
}