public function renameView($oldName, $newName)
    {
        if (!$this->hasView($oldName)) {
            throw SchemaException::schemaViewDoesNotExist($this->getName(), $oldName);
        }

        if ($this->hasView($newName)) {
            throw SchemaException::schemaViewAlreadyExists($this->getName(), $newName);
        }

        $this->views[$oldName]->setName($newName);
        $this->views[$newName] = $this->views[$oldName];

        unset($this->views[$oldName]);
    }
public function renameView($oldName, $newName)
    {
        if (!$this->hasView($oldName)) {
            throw SchemaException::schemaViewDoesNotExist($this->getName(), $oldName);
        }

        if ($this->hasView($newName)) {
            throw SchemaException::schemaViewAlreadyExists($this->getName(), $newName);
        }

        $this->views[$oldName]->setName($newName);
        $this->views[$newName] = $this->views[$oldName];

        unset($this->views[$oldName]);
    }
public function renameView ( $ oldName , $ newName ) { if ( ! $ this -> hasView ( $ oldName ) ) { throw SchemaException :: schemaViewDoesNotExist ( $ this -> getName ( ) , $ oldName ) ; } if ( $ this -> hasView ( $ newName ) ) { throw SchemaException :: schemaViewAlreadyExists ( $ this -> getName ( ) , $ newName ) ; } $ this -> views [ $ oldName ] -> setName ( $ newName ) ; $ this -> views [ $ newName ] = $ this -> views [ $ oldName ] ; unset ( $ this -> views [ $ oldName ] ) ; }
Renames a view.

@param string $oldName The old view name.
@param string $newName The new view name.

@throws \Fridge\DBAL\Exception\SchemaException If the old view does not exist or if the new view already exists.
Renames a view .