class Setup (View source)

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

Methods

static void
registerAutoloadDirectory(string $directory)

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

static Configuration
createAnnotationMetadataConfiguration(array $paths, boolean $isDevMode = false, string $proxyDir = null, Cache $cache = null, bool $useSimpleAnnotationReader = true)

Creates a configuration with an annotation metadata driver.

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

Creates a configuration with a xml metadata driver.

static Configuration
createYAMLMetadataConfiguration(array $paths, boolean $isDevMode = false, string $proxyDir = null, Cache $cache = null)

Creates a configuration with a yaml metadata driver.

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

Creates a configuration without a metadata driver.

Details

static void 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

Return Value

void

static Configuration createAnnotationMetadataConfiguration(array $paths, boolean $isDevMode = false, string $proxyDir = null, Cache $cache = null, bool $useSimpleAnnotationReader = true)

Creates a configuration with an annotation metadata driver.

Parameters

array $paths
boolean $isDevMode
string $proxyDir
Cache $cache
bool $useSimpleAnnotationReader

Return Value

Configuration

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

Creates a configuration with a xml metadata driver.

Parameters

array $paths
boolean $isDevMode
string $proxyDir
Cache $cache

Return Value

Configuration

static Configuration createYAMLMetadataConfiguration(array $paths, boolean $isDevMode = false, string $proxyDir = null, Cache $cache = null)

Creates a configuration with a yaml metadata driver.

Parameters

array $paths
boolean $isDevMode
string $proxyDir
Cache $cache

Return Value

Configuration

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

Creates a configuration without a metadata driver.

Parameters

bool $isDevMode
string $proxyDir
Cache $cache

Return Value

Configuration