Jackalope\Transport\DoctrineDBAL\Client::deleteWorkspace PHP Méthode

deleteWorkspace() public méthode

{@inheritDoc}
public deleteWorkspace ( $name )
    public function deleteWorkspace($name)
    {
        if (!$this->workspaceExists($name)) {
            throw new RepositoryException("Workspace '{$name}' cannot be\n            deleted as it does not exist");
        }
        try {
            $this->getConnection()->delete('phpcr_workspaces', array('name' => $name));
        } catch (\Exception $e) {
            throw new RepositoryException("Couldn't delete workspace '{$name}': " . $e->getMessage(), 0, $e);
        }
        try {
            $this->getConnection()->delete('phpcr_nodes', array('workspace_name' => $name));
        } catch (\Exception $e) {
            throw new RepositoryException("Couldn't delete nodes in workspace\n            '{$name}': " . $e->getMessage(), 0, $e);
        }
        try {
            $this->getConnection()->delete('phpcr_binarydata', array('workspace_name' => $name));
        } catch (\Exception $e) {
            throw new RepositoryException("Couldn't delete binary data in\n            workspace '{$name}': " . $e->getMessage(), 0, $e);
        }
    }

Usage Example

 /**
  * {@inheritDoc}
  *
  */
 public function deleteWorkspace($name)
 {
     parent::deleteWorkspace($name);
     $this->caches['meta']->delete('workspaces');
     $this->caches['meta']->delete("workspace: {$name}");
     $this->clearCaches();
 }
All Usage Examples Of Jackalope\Transport\DoctrineDBAL\Client::deleteWorkspace