Jump to main content Jump to doc navigation

xPDOManager::removeSourceContainer()

Drops a physical data container, if it exists.

Syntax

API Docs: removeSourceContainer

int removeSourceContainer (string $dsn, string $username, string $password)

Examples

Drop a database called 'MyDatabase'.

$newDatabaseName = 'MyDatabase';
$dsn = 'mysql:host=localhost;dbname='.$newDatabaseName.';charset=utf8';
$manager = $xpdo->getManager();
$manager->removeSourceContainer($dsn,'myusername','mypassword');