KMP PHP API Reference

BackupCommand extends Command
in package

CLI backup management: create and restore backups.

Usage: bin/cake backup create --key "my-secret-key" bin/cake backup restore kmp-backup-20260220-120000.kmpbackup --key "my-secret-key"

Table of Contents

Methods

defaultName()  : string
Get the default command name.
execute()  : int|null
Execute the command.
buildOptionParser()  : ConsoleOptionParser
Configure the command option parser.
doCreate()  : int
Do create.
doRestore()  : int
Do restore.
formatBytes()  : string
Format bytes.

Methods

defaultName()

Get the default command name.

public static defaultName() : string
Return values
string

execute()

Execute the command.

public execute(Arguments $args, ConsoleIo $io) : int|null
Parameters
$args : Arguments
$io : ConsoleIo
Return values
int|null

buildOptionParser()

Configure the command option parser.

protected buildOptionParser(ConsoleOptionParser $parser) : ConsoleOptionParser
Parameters
$parser : ConsoleOptionParser
Return values
ConsoleOptionParser

doCreate()

Do create.

private doCreate(string $key, ConsoleIo $io) : int
Parameters
$key : string
$io : ConsoleIo
Return values
int

doRestore()

Do restore.

private doRestore(string $key, Arguments $args, ConsoleIo $io) : int
Parameters
$key : string
$args : Arguments
$io : ConsoleIo
Return values
int

formatBytes()

Format bytes.

private formatBytes(int $bytes) : string
Parameters
$bytes : int
Return values
string

        
On this page

Search results