Documentation

UpdateController extends Controller

Class UpdateController

The main Update component

Tags
copyright

CLOUDREXX CMS - CLOUDREXX AG

author

Project Team SS4U info@cloudrexx.com

subpackage

coremodule_update

Table of Contents

Properties

$cli  : Application
Command Line Interface
$cx  : Cx
Main class instance
$pendingCodeBaseChangesYml  : string
pending codeBase changes yml
$systemComponentController  : SystemComponentController
SystemComponentController for this Component

Methods

__call()  : mixed
Route methods like getName(), getType(), getDirectory(), etc.
__construct()  : mixed
Creates new controller
applyDelta()  : null
Get the serialized Delta
calculateDbDelta()  : mixed
Calculate database delta
getAllCodeBaseVersions()  : array<string|int, mixed>
getAllCodeBaseVersions
getDoctrineMigrationCli()  : Application
Get Doctrine Migration Command Line Interface
getPendingCodeBaseChangesFile()  : string
Get codeBase Changes file
getSystemComponentController()  : SystemComponentController
Returns the main controller
getUpdateWebsiteDetailsFromYml()  : array<string|int, mixed>
Get update websiteDetailsFromYml
registerDbUpdateHooks()  : mixed
Register DB Update hooks
storeUpdateWebsiteDetailsToYml()  : null
Store the website details into the YML file
updateCodeBase()  : mixed
Update CodeBase
getDoctrineMigrationCommand()  : object
Get the doctrine migrations command as object
rollBackDelta()  : mixed
Rollback the delta to make the website as old state

Properties

$pendingCodeBaseChangesYml

pending codeBase changes yml

protected string $pendingCodeBaseChangesYml = 'PendingCodeBaseChanges.yml'

Methods

__call()

Route methods like getName(), getType(), getDirectory(), etc.

public __call(string $methodName, array<string|int, mixed> $arguments) : mixed
Parameters
$methodName : string

Name of method to call

$arguments : array<string|int, mixed>

List of arguments for the method to call

Return values
mixed

Return value of the method to call

applyDelta()

Get the serialized Delta

public applyDelta() : null

This loads the serialized Delta and calls applyNext() on it until returns false.

Return values
null

calculateDbDelta()

Calculate database delta

public calculateDbDelta(int $oldVersion, string $codeBasePath) : mixed

It will calculate which codeBase database update scripts need to be executed. If the original version number is smaller than new version number, Add each version between those two versions to the delta as non-rollback updates otherwise delta as rollback updates

Parameters
$oldVersion : int
$codeBasePath : string

getAllCodeBaseVersions()

getAllCodeBaseVersions

public getAllCodeBaseVersions(string $codeBasePath) : array<string|int, mixed>
Parameters
$codeBasePath : string

codeBase path

Return values
array<string|int, mixed>

codeBase versions

getDoctrineMigrationCli()

Get Doctrine Migration Command Line Interface

public getDoctrineMigrationCli() : Application
Return values
Application

getPendingCodeBaseChangesFile()

Get codeBase Changes file

public getPendingCodeBaseChangesFile() : string
Return values
string

$pendingCodeBaseChangesYml

getUpdateWebsiteDetailsFromYml()

Get update websiteDetailsFromYml

public getUpdateWebsiteDetailsFromYml(string $file) : array<string|int, mixed>
Parameters
$file : string

yml file name

Return values
array<string|int, mixed>

website details

registerDbUpdateHooks()

Register DB Update hooks

public registerDbUpdateHooks(Delta $delta) : mixed

This saves the calculated delta to /tmp/Update/$pendingCodeBaseChangesYml. It contains a serialized Delta.

Parameters
$delta : Delta
Tags
staticvar

object $deltaRepo

storeUpdateWebsiteDetailsToYml()

Store the website details into the YML file

public storeUpdateWebsiteDetailsToYml(string $folderPath, string $filePath, array<string|int, mixed> $ymlContent) : null
Parameters
$folderPath : string
$filePath : string
$ymlContent : array<string|int, mixed>
Return values
null

updateCodeBase()

Update CodeBase

public updateCodeBase(string $newCodeBaseVersion, string $installationRootPath[, string $oldCodeBaseVersion = '' ]) : mixed
Parameters
$newCodeBaseVersion : string

latest codeBase version

$installationRootPath : string

installationRoot path

$oldCodeBaseVersion : string = ''

old codeBase version

getDoctrineMigrationCommand()

Get the doctrine migrations command as object

protected getDoctrineMigrationCommand(string $migrationCommandNameSpace, object $configuration) : object
Parameters
$migrationCommandNameSpace : string
$configuration : object
Return values
object

doctrine migration command

rollBackDelta()

Rollback the delta to make the website as old state

protected rollBackDelta() : mixed

        
On this page

Search results