\PrestaShopBackupCore

Summary

Methods
Properties
Constants
__construct()
setCustomBackupPath()
getRealBackupPath()
getBackupPath()
backupExist()
getBackupURL()
delete()
deleteSelection()
add()
$id
$error
$backupDir
$customBackupDir
$psBackupAll
$psBackupDropTable
No constants found
No protected methods found
No protected properties found
N/A
No private methods found
No private properties found
N/A

Properties

$id

$id : integer

Type

integer — Object id

$error

$error : string

Type

string — Last error messages

$backupDir

$backupDir : string

Type

string — default backup directory.

$customBackupDir

$customBackupDir : string

Type

string — custom backup directory.

$psBackupAll

$psBackupAll : 

Type

$psBackupDropTable

$psBackupDropTable : 

Type

Methods

__construct()

__construct(string  $filename = null) 

Creates a new backup object

Parameters

string $filename

Filename of the backup file

setCustomBackupPath()

setCustomBackupPath(string  $dir) : boolean

you can set a different path with that function

Parameters

string $dir

Returns

boolean —

bo

getRealBackupPath()

getRealBackupPath(string  $filename = null) : string

get the path to use for backup (customBackupDir if specified, or default)

Parameters

string $filename

filename to use

Returns

string —

full path

getBackupPath()

getBackupPath(string  $filename = '') : \The

Get the full path of the backup file

Parameters

string $filename

prefix of the backup file (datetime will be the second part)

Returns

\The —

full path of the backup file, or false if the backup file does not exists

backupExist()

backupExist(string  $filename) : boolean

Check if a backup file exist

Parameters

string $filename

prefix of the backup file (datetime will be the second part)

Returns

boolean —

true if backup file exist

getBackupURL()

getBackupURL() : \The

Get the URL used to retreive this backup file

Returns

\The —

url used to request the backup file

delete()

delete() : boolean

Delete the current backup file

Returns

boolean —

Deletion result, true on success

deleteSelection()

deleteSelection(  $list) : boolean

Deletes a range of backup files

Parameters

$list

Returns

boolean —

True on success

add()

add() : boolean

Creates a new backup file

Returns

boolean —

true on successful backup