|
@@ 60-66 (lines=7) @@
|
| 57 |
|
* |
| 58 |
|
* @return self |
| 59 |
|
*/ |
| 60 |
|
public static function createXmlMappingDriver(array $namespaces, array $managerParameters = [], $enabledParameter = false, array $aliasMap = []) |
| 61 |
|
{ |
| 62 |
|
$locator = new Definition('Doctrine\Common\Persistence\Mapping\Driver\SymfonyFileLocator', [$namespaces, '.orm.xml']); |
| 63 |
|
$driver = new Definition('Doctrine\ORM\Mapping\Driver\XmlDriver', [$locator]); |
| 64 |
|
|
| 65 |
|
return new DoctrineOrmMappingsPass($driver, $namespaces, $managerParameters, $enabledParameter, $aliasMap); |
| 66 |
|
} |
| 67 |
|
|
| 68 |
|
/** |
| 69 |
|
* @param array $namespaces Hashmap of directory path to namespace |
|
@@ 81-87 (lines=7) @@
|
| 78 |
|
* |
| 79 |
|
* @return self |
| 80 |
|
*/ |
| 81 |
|
public static function createYamlMappingDriver(array $namespaces, array $managerParameters = [], $enabledParameter = false, array $aliasMap = []) |
| 82 |
|
{ |
| 83 |
|
$locator = new Definition('Doctrine\Common\Persistence\Mapping\Driver\SymfonyFileLocator', [$namespaces, '.orm.yml']); |
| 84 |
|
$driver = new Definition('Doctrine\ORM\Mapping\Driver\YamlDriver', [$locator]); |
| 85 |
|
|
| 86 |
|
return new DoctrineOrmMappingsPass($driver, $namespaces, $managerParameters, $enabledParameter, $aliasMap); |
| 87 |
|
} |
| 88 |
|
|
| 89 |
|
/** |
| 90 |
|
* @param array $namespaces Hashmap of directory path to namespace |
|
@@ 102-108 (lines=7) @@
|
| 99 |
|
* |
| 100 |
|
* @return self |
| 101 |
|
*/ |
| 102 |
|
public static function createPhpMappingDriver(array $namespaces, array $managerParameters = [], $enabledParameter = false, array $aliasMap = []) |
| 103 |
|
{ |
| 104 |
|
$locator = new Definition('Doctrine\Common\Persistence\Mapping\Driver\SymfonyFileLocator', [$namespaces, '.php']); |
| 105 |
|
$driver = new Definition('Doctrine\Common\Persistence\Mapping\Driver\PHPDriver', [$locator]); |
| 106 |
|
|
| 107 |
|
return new DoctrineOrmMappingsPass($driver, $namespaces, $managerParameters, $enabledParameter, $aliasMap); |
| 108 |
|
} |
| 109 |
|
|
| 110 |
|
/** |
| 111 |
|
* @param array $namespaces List of namespaces that are handled with annotation mapping |
|
@@ 124-130 (lines=7) @@
|
| 121 |
|
* |
| 122 |
|
* @return self |
| 123 |
|
*/ |
| 124 |
|
public static function createAnnotationMappingDriver(array $namespaces, array $directories, array $managerParameters = [], $enabledParameter = false, array $aliasMap = []) |
| 125 |
|
{ |
| 126 |
|
$reader = new Reference('annotation_reader'); |
| 127 |
|
$driver = new Definition('Doctrine\ORM\Mapping\Driver\AnnotationDriver', [$reader, $directories]); |
| 128 |
|
|
| 129 |
|
return new DoctrineOrmMappingsPass($driver, $namespaces, $managerParameters, $enabledParameter, $aliasMap); |
| 130 |
|
} |
| 131 |
|
|
| 132 |
|
/** |
| 133 |
|
* @param array $namespaces List of namespaces that are handled with static php mapping |