Permalink
Browse files

Merge pull request #102 from schmittjoh/configUpdate

updated configuration
  • Loading branch information...
2 parents c85de03 + 7e47a60 commit 19682bf87a7cfa25322419921414ede57aa0373a @guilhermeblanco guilhermeblanco committed Aug 5, 2011
Showing with 15 additions and 14 deletions.
  1. +15 −14 lib/Doctrine/ORM/Configuration.php
@@ -85,7 +85,7 @@ public function setAutoGenerateProxyClasses($bool)
/**
* Gets the namespace where proxy classes reside.
- *
+ *
* @return string
*/
public function getProxyNamespace()
@@ -96,7 +96,7 @@ public function getProxyNamespace()
/**
* Sets the namespace where proxy classes reside.
- *
+ *
* @param string $ns
*/
public function setProxyNamespace($ns)
@@ -118,22 +118,23 @@ public function setMetadataDriverImpl(Driver $driverImpl)
/**
* Add a new default annotation driver with a correctly configured annotation reader.
- *
+ *
* @param array $paths
* @return Mapping\Driver\AnnotationDriver
*/
public function newDefaultAnnotationDriver($paths = array())
{
- if (version_compare(\Doctrine\Common\Version::VERSION, '3.0.0-DEV', '>=')) {
+ if (version_compare(\Doctrine\Common\Version::VERSION, '2.2.0-DEV', '>=')) {
// Register the ORM Annotations in the AnnotationRegistry
AnnotationRegistry::registerFile(__DIR__ . '/Mapping/Driver/DoctrineAnnotations.php');
-
- $reader = new AnnotationReader();
+
+ $reader = new \Doctrine\Common\Annotations\SimpleAnnotationReader();
+ $reader->addNamespace('Doctrine\ORM\Mapping');
$reader = new \Doctrine\Common\Annotations\CachedReader($reader, new ArrayCache());
} else if (version_compare(\Doctrine\Common\Version::VERSION, '2.1.0-DEV', '>=')) {
// Register the ORM Annotations in the AnnotationRegistry
AnnotationRegistry::registerFile(__DIR__ . '/Mapping/Driver/DoctrineAnnotations.php');
-
+
$reader = new AnnotationReader();
$reader->setDefaultAnnotationNamespace('Doctrine\ORM\Mapping\\');
$reader->setIgnoreNotImportedAnnotations(true);
@@ -162,7 +163,7 @@ public function addEntityNamespace($alias, $namespace)
/**
* Resolves a registered namespace alias to the full namespace.
*
- * @param string $entityNamespaceAlias
+ * @param string $entityNamespaceAlias
* @return string
* @throws MappingException
*/
@@ -185,10 +186,10 @@ public function setEntityNamespaces(array $entityNamespaces)
{
$this->_attributes['entityNamespaces'] = $entityNamespaces;
}
-
+
/**
* Retrieves the list of registered entity namespace aliases.
- *
+ *
* @return array
*/
public function getEntityNamespaces()
@@ -360,7 +361,7 @@ public function addCustomStringFunction($name, $className)
/**
* Gets the implementation class name of a registered custom string DQL function.
- *
+ *
* @param string $name
* @return string
*/
@@ -403,7 +404,7 @@ public function addCustomNumericFunction($name, $className)
/**
* Gets the implementation class name of a registered custom numeric DQL function.
- *
+ *
* @param string $name
* @return string
*/
@@ -446,7 +447,7 @@ public function addCustomDatetimeFunction($name, $className)
/**
* Gets the implementation class name of a registered custom date/time DQL function.
- *
+ *
* @param string $name
* @return string
*/
@@ -497,7 +498,7 @@ public function addCustomHydrationMode($modeName, $hydrator)
/**
* Set a class metadata factory.
- *
+ *
* @param string $cmf
*/
public function setClassMetadataFactoryName($cmfName)

0 comments on commit 19682bf

Please sign in to comment.