class Setup (View source)

Convenience class for setting up Doctrine from different installations and configurations.

Methods

static 
registerAutoloadDirectory(string $directory)

Use this method to register all autoloads for a downloaded Doctrine library.

static Configuration
createAnnotationMetadataConfiguration(array $paths, $isDevMode = false, $proxyDir = null, Cache|null $cache = null)

Creates a configuration with an annotation metadata driver.

static Configuration
createXMLMetadataConfiguration(array $paths, $isDevMode = false, $proxyDir = null, Cache|null $cache = null)

Creates a configuration with a xml metadata driver.

static Configuration
createConfiguration($isDevMode = false, $proxyDir = null, Cache|null $cache = null)

Creates a configuration without a metadata driver.

Details

static registerAutoloadDirectory(string $directory)

Use this method to register all autoloads for a downloaded Doctrine library.

Pick the directory the library was uncompressed into.

Parameters

string $directory

static Configuration createAnnotationMetadataConfiguration(array $paths, $isDevMode = false, $proxyDir = null, Cache|null $cache = null)

Creates a configuration with an annotation metadata driver.

Parameters

array $paths
$isDevMode
$proxyDir
Cache|null $cache

Return Value

Configuration

static Configuration createXMLMetadataConfiguration(array $paths, $isDevMode = false, $proxyDir = null, Cache|null $cache = null)

Creates a configuration with a xml metadata driver.

Parameters

array $paths
$isDevMode
$proxyDir
Cache|null $cache

Return Value

Configuration

static Configuration createConfiguration($isDevMode = false, $proxyDir = null, Cache|null $cache = null)

Creates a configuration without a metadata driver.

Parameters

$isDevMode
$proxyDir
Cache|null $cache

Return Value

Configuration