UpdateCoreCommand

Extends \Joomla\Console\Command\AbstractCommand

Console command for updating Joomla! core

since

4.0.0

package

Application

Methods

__construct

UpdateCoreCommand constructor.

__construct(\Joomla\Database\DatabaseInterface db) : mixed
since

4.0.0

Arguments

db

\Joomla\Database\DatabaseInterfaceDatabase Instance

Response

mixed

configure

Initialise the command.

configure() : void
since

4.0.0

configureIO

Configures the IO

configureIO(\Symfony\Component\Console\Input\InputInterface input, \Symfony\Component\Console\Output\OutputInterface output) : void
since

4.0.0

Arguments

input

\Symfony\Component\Console\Input\InputInterfaceConsole Input

output

\Symfony\Component\Console\Output\OutputInterfaceConsole Output

copyFileTo

Copy a file to a destination directory

copyFileTo(string file, string dir) : void
since

4.0.0

Arguments

file

stringFull path to file

dir

stringDestination directory

doExecute

Internal function to execute the command.

doExecute(\Symfony\Component\Console\Input\InputInterface input, \Symfony\Component\Console\Output\OutputInterface output) : int
since

4.0.0

throws

\Exception

Arguments

input

\Symfony\Component\Console\Input\InputInterfaceThe input to inject into the command.

output

\Symfony\Component\Console\Output\OutputInterfaceThe output to inject into the command.

Response

intThe command exit code

downloadFile

Downloads the Update file

downloadFile(string url) : bool
since

4.0.0

Arguments

url

stringURL to update file

Response

bool| string

extractFile

Extracts Update file

extractFile(string file) : array
since

4.0.0

Arguments

file

stringFull path to file location

Response

array| boolean

getUpdateModel

Retrieves the Update model from com_joomlaupdate

getUpdateModel() : mixed
since

4.0.0

throws

\Exception

Response

mixed

processUpdatePackage

Downloads and extracts the update Package

processUpdatePackage(array updateInformation) : array
since

4.0.0

Arguments

updateInformation

arrayStores the update information

Response

array| boolean

setUpdateInfo

Sets the update Information

setUpdateInfo(array data) : void
since

4.0.0

Arguments

data

arrayStores the update information

setUpdateModel

Sets the Update Model

setUpdateModel() : void
since

4.0.0

updateJoomlaCore

Update Core Joomla

updateJoomlaCore(mixed updatemodel) : bool
since

4.0.0

Arguments

updatemodel

mixedUpdate Model

Response

boolsuccess

Constants

UPDATE_SUCCESSFUL

Return code for successful update

Value 0
since

4.0.0

ERR_UPDATE_FAILED

Return code for failed update

Value 2
since

4.0.0

ERR_CHECKS_FAILED

Return code for failed checks

Value 1
since

4.0.0

Properties

defaultName

The default command name

static
since

4.0.0

Type(s)

string

cliInput

Stores the Input Object

since

4.0.0

Type(s)

\Joomla\Application\Cli\CliInput

ioStyle

SymfonyStyle Object

since

4.0.0

Type(s)

\Symfony\Component\Console\Style\SymfonyStyle

updateInfo

Update Information

since

4.0.0

Type(s)

array

updateModel

Update Model

since

4.0.0

Type(s)

array

progressBar

Progress Bar object

since

4.0.0

Type(s)

\Symfony\Component\Console\Helper\ProgressBar

db

since

4.0.0

Type(s)

\Joomla\Database\DatabaseInterface