Class DatabaseStructureManager

Methods summary

public
# __construct( Doctrine\ORM\EntityManager $em )

Create a new structure manager.

public Doctrine\ORM\EntityManager
# getEntityManager( )

Get the entity manager object for this structure manager.

public string
# getProxyDir( )

Returns the proxies path.

public boolean
# generateProxyClasses( )

Generates the proxy classes for all the entities managed by this class. Returns true on successful generation and false if there were no proxy classes to be generated.

public boolean
# generateProxyClassesFor( array $metadatas )

Generates the proxy classes for all given classes contained in the $metadatas array. Returns true on successful generation and false if there were no proxy classes to be generated

public boolean
# destroyProxyClasses( string $prefix )

Destroys all the proxy classes that have the defined prefix. No need to define the generic doctrine proxy marker prefix, i.e. "CG" but the part after that, e.g. "ConcreteCore".

public boolean
# installDatabase( )

Installs the database tables according to the entity schema definitions. This will not install any existing tables but it will migrate those tables to match the current schema definitions for the classes.

public boolean
# installDatabaseFor( array $metadatas )

Installs the database tables for all entity classes contained within the $metadatas array. Returns true if new tables were created or existing ones altered. Otherwise this will return false if there were no database migrations needed.

public boolean
# uninstallDatabase( )

This drops all the tables related to the entities managed by this class.

public boolean
# uninstallDatabaseFor( array $metadatas )

Uninstalls the database tables for all given entity classes contained within the $metadatas array. Returns true if there were tables that were dropped and false otherwise.

public integer
# dropObsoleteDatabaseTables( string $prefix, array $excludeTables = array() )

Drops all the database tables that a) are prefixed with the given prefix string b) are not linked to any existing entity managed by this class c) are not contained within the $excludeTables array

public boolean
# hasEntities( )

Determines whether the entity manager instance for this class has any entity classes defined in its entity class path.

public Doctrine\Common\Persistence\Mapping\ClassMetadata[]
# getMetadatas( )

Returns the entity classes and their metadata. Loads this data if it has not been already loaded by this instancfe.

protected
# loadMetadatas( )

Loads the entity class metadata into the $metadatas variable.

Properties summary

protected Doctrine\ORM\EntityManager $entityManager

The entity manager instance.

#
protected Doctrine\Common\Persistence\Mapping\ClassMetadata[] $metadatas

The entity classes and their metadata.

#