File: /var/www/html/wp-content/plugins/backup-guard-security-platinum/com/lib/State.php
<?php
namespace BackupGuard\Security;
use BackupGuard\Security\State as State;
class State
{
protected $inprogress = false;
protected $progress = 0;
protected $actionId = null;
protected $actionStartTs = 0;
protected $reportFileName = '';
protected $type = '';
protected $token = '';
protected $action = '';
protected $warningsFound = false;
protected $offset = 0;
protected $progressCursor = 0;
protected $cursor = 0;
function __construct()
{
}
public function getCursor()
{
return $this->cursor;
}
public function setCursor($cursor)
{
$this->cursor = $cursor;
}
public function getProgressCursor()
{
return $this->progressCursor;
}
public function setProgressCursor($progressCursor)
{
$this->progressCursor = $progressCursor;
}
public function setInprogress($inprogress)
{
$this->inprogress = $inprogress;
}
public function setToken($token)
{
$this->token = $token;
}
public function setAction($action)
{
$this->action = $action;
}
public function setType($type)
{
$this->type = $type;
}
public function setActionId($actionId)
{
$this->actionId = $actionId;
}
public function setActionStartTs($actionStartTs)
{
$this->actionStartTs = $actionStartTs;
}
public function setReportFileName($reportFileName)
{
$this->reportFileName = $reportFileName;
}
public function setProgress($progress)
{
$this->progress = $progress;
}
public function setWarningsFound($warningsFound)
{
$this->warningsFound = $warningsFound;
}
public function getInprogress()
{
return $this->inprogress;
}
public function getToken()
{
return $this->token;
}
public function getAction()
{
return $this->action;
}
public function getType()
{
return $this->type;
}
public function getActionId()
{
return $this->actionId;
}
public function getActionStartTs()
{
return $this->actionStartTs;
}
public function getReportFileName()
{
return $this->reportFileName;
}
public function getProgress()
{
return $this->progress;
}
public function getWarningsFound()
{
return $this->warningsFound;
}
public function setOffset($offset)
{
$this->offset = $offset;
}
public function getOffset()
{
return $this->offset;
}
public static function factory($type)
{
if (file_exists(BGS_LIB_PATH.$type.'.php')) {
require_once(BGS_LIB_PATH.$type.'.php');
if (class_exists($type)) {
throw new \Exception("Invalid state type.");
}
$stateClassName = 'BackupGuard\Security\State\\'.$type;
return new $stateClassName();
}
else {
throw new \Exception("Invalid state type.");
}
}
}