UpdateCoreCommand
Extends AbstractCommandConsole command for updating Joomla! core
| since |
4.0.0 |
|---|---|
| package |
Joomla CMS |
Methods
__construct
UpdateCoreCommand constructor.
__construct(\Joomla\Database\DatabaseInterface db) :
| since |
4.0.0 |
|---|
Arguments
- db
DatabaseInterfaceDatabase Instance
Response
mixed
checkMajorUpgrade
Check pre-conditions for major version upgrade
checkMajorUpgrade() :
| since |
6.0.0 |
|---|
Response
boolTrue if success
checkSchema
Check Database Table Structure
checkSchema() :
| since |
4.4.0 |
|---|
Response
intthe number of errors
configure
Initialise the command.
configure() :
| since |
4.0.0 |
|---|
Response
void
configureIO
Configures the IO
configureIO(\Symfony\Component\Console\Input\InputInterface input, \Symfony\Component\Console\Output\OutputInterface output) :
| since |
4.0.0 |
|---|
Arguments
- input
InputInterfaceConsole Input- output
OutputInterfaceConsole Output
Response
void
copyFileTo
Copy a file to a destination directory
copyFileTo( file, dir) :
| since |
4.0.0 |
|---|
Arguments
- file
stringFull path to file- dir
stringDestination directory
Response
void
doExecute
Internal function to execute the command.
doExecute(\Symfony\Component\Console\Input\InputInterface input, \Symfony\Component\Console\Output\OutputInterface output) :
| since |
4.0.0 |
|---|---|
| throws |
|
Arguments
- input
InputInterfaceThe input to inject into the command.- output
OutputInterfaceThe output to inject into the command.
Response
intThe command exit code
downloadFile
Downloads the Update file
downloadFile( url) : bool|string
| since |
4.0.0 |
|---|
Arguments
- url
stringURL to update file
Response
bool|string
extractFile
Extracts Update file
extractFile( file) : array|bool
| since |
4.0.0 |
|---|
Arguments
- file
stringFull path to file location
Response
array<string|int, mixed>|bool
getUpdateModel
Retrieves the Update model from com_joomlaupdate
getUpdateModel() :
| since |
4.0.0 |
|---|---|
| throws |
|
Response
mixed
processUpdatePackage
Downloads and extracts the update Package
processUpdatePackage(mixed||string|int updateInformation) : array|bool
| since |
4.0.0 |
|---|
Arguments
- updateInformation
array<string|int, mixed>Stores the update information
Response
array<string|int, mixed>|bool
setUpdateInfo
Sets the update Information
setUpdateInfo(mixed||string|int data) :
| since |
4.0.0 |
|---|
Arguments
- data
array<string|int, mixed>Stores the update information
Response
void
setUpdateModel
Sets the Update Model
setUpdateModel() :
| since |
4.0.0 |
|---|
Response
void
updateJoomlaCore
Update Core Joomla
updateJoomlaCore( updatemodel) :
| 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
| since |
4.0.0 |
|---|
Type(s)
string
cliInput
Stores the Input Object
| since |
4.0.0 |
|---|
Type(s)
CliInput
ioStyle
SymfonyStyle Object
| since |
4.0.0 |
|---|
Type(s)
SymfonyStyle
updateInfo
Update Information
| since |
4.0.0 |
|---|
Type(s)
array<string|int, mixed>
updateModel
Update Model
| since |
4.0.0 |
|---|
Type(s)
array<string|int, mixed>
progressBar
Progress Bar object
| since |
4.0.0 |
|---|
Type(s)
ProgressBar
db
| since |
4.0.0 |
|---|
Type(s)
DatabaseInterface