FacturaScripts

Updater extends Controller

Description of Updater

Table of Contents

CORE_PROJECT_ID 1
CORE_ZIP_FOLDER 'facturascripts'
UPDATE_CORE_URL 'https://facturascripts.com/DownloadBuild'
$pluginManager PluginManager
$telemetryManager TelemetryManager
$updaterItems array
$className Name of the class of the controller (although its in inheritance from this class, the name of the final class we will have here) string
$dataBase It provides direct access to the database. DataBase
$empresa Selected company. Empresa
$multiRequestProtection MultiRequestProtection
$permissions User permissions on this controller. ControllerPermissions
$request Request on which we can get data. Request
$response HTTP Response object. Response
$template Name of the file for the template. string|bool
$title Title of the page. string
$uri Given uri, default is empty. string
$user User logged in. User|bool
getPageData() Returns basic page attributes array
getCoreVersion() Returns FacturaScripts core version. float
privateCore() Runs the controller's private logic. mixed
cancelAction() Remove downloaded file. mixed
downloadAction() Download selected update. mixed
execAction() Execute selected action. mixed
getUpdateItems() array
getUpdateItemsCore() mixed
getUpdateItemsPlugin() mixed
postUpdateAction() mixed
updateAction() Extract zip file and update all files. bool
updateCore() bool
updatePlugin() bool
__construct() Initialize all objects and properties. mixed
addExtension() mixed
getPageData() Return the basic data for this page. array
getTemplate() Return the template to use for this controller. string|bool
pipe() mixed
privateCore() Runs the controller's private logic. mixed
publicCore() Execute the public part of the controller. mixed
redirect() Redirect to an url or controller. mixed
setTemplate() Set the template to use for this controller. bool
toolBox() ToolBox
url() Return the URL of the actual controller. string
checkPHPversion() mixed
getClassName() Return the name of the controller. string

Constants

CORE_PROJECT_ID

mixed $CORE_PROJECT_ID = 1

CORE_ZIP_FOLDER

mixed $CORE_ZIP_FOLDER = 'facturascripts'

UPDATE_CORE_URL

mixed $UPDATE_CORE_URL = 'https://facturascripts.com/DownloadBuild'

Properties

$updaterItems

public array $updaterItems = []

$className

Name of the class of the controller (although its in inheritance from this class, the name of the final class we will have here)

private string $className

$request

Request on which we can get data.

public Request $request

$response

HTTP Response object.

protected Response $response

$template

Name of the file for the template.

private string|bool $template

$uri

Given uri, default is empty.

public string $uri

Methods

getPageData()

Returns basic page attributes

public getPageData( ) : array
Return values
array

getCoreVersion()

Returns FacturaScripts core version.

public getCoreVersion( ) : float
Return values
float

cancelAction()

Remove downloaded file.

private cancelAction( ) : mixed
Return values
mixed

downloadAction()

Download selected update.

private downloadAction( ) : mixed
Return values
mixed

execAction()

Execute selected action.

protected execAction( $action : string ) : mixed
Parameters
$action : string
Return values
mixed

getUpdateItems()

private getUpdateItems( ) : array
Return values
array

getUpdateItemsCore()

private getUpdateItemsCore( &$items : array , $projectData : array ) : mixed
Parameters
$items : array
$projectData : array
Return values
mixed

getUpdateItemsPlugin()

private getUpdateItemsPlugin( &$items : array , $pluginUpdate : array , $installedVersion : float ) : mixed
Parameters
$items : array
$pluginUpdate : array
$installedVersion : float
Return values
mixed

postUpdateAction()

private postUpdateAction( ) : mixed
Return values
mixed

updateAction()

Extract zip file and update all files.

private updateAction( ) : bool
Return values
bool

updateCore()

private updateCore( $zip : ZipArchive , $fileName : string ) : bool
Parameters
$zip : ZipArchive
$fileName : string
Return values
bool

updatePlugin()

private updatePlugin( $zip : ZipArchive , $fileName : string ) : bool
Parameters
$zip : ZipArchive
$fileName : string
Return values
bool

__construct()

Initialize all objects and properties.

public __construct( $className : string [, $uri : string = '' ] ) : mixed
Parameters
$className : string
$uri : string = ''
Return values
mixed

addExtension()

public static addExtension( $extension : mixed ) : mixed
Parameters
$extension : mixed
Return values
mixed

getPageData()

Return the basic data for this page.

public getPageData( ) : array
Return values
array

getTemplate()

Return the template to use for this controller.

public getTemplate( ) : string|bool
Return values
string|bool

pipe()

public pipe( $name : string , ...$arguments : array ) : mixed
Parameters
$name : string
$arguments : array
Return values
mixed

publicCore()

Execute the public part of the controller.

public publicCore( &$response : Response ) : mixed
Parameters
$response : Response
Return values
mixed

redirect()

Redirect to an url or controller.

public redirect( $url : string , $delay : int ) : mixed
Parameters
$url : string
$delay : int
Return values
mixed

setTemplate()

Set the template to use for this controller.

public setTemplate( $template : string|bool ) : bool
Parameters
$template : string|bool
Return values
bool

url()

Return the URL of the actual controller.

public url( ) : string
Return values
string

checkPHPversion()

private checkPHPversion( $min : float ) : mixed
Parameters
$min : float
Return values
mixed

getClassName()

Return the name of the controller.

protected getClassName( ) : string
Return values
string

Search results