Updater extends Updater Uses ExtensionsTrait
Class created by Core/Base/PluginManager
Table of Contents
$extensions | Stores class extensions. | array |
---|---|---|
$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 |
__call() | Executes the first matched extension. | mixed |
addExtension() | mixed | |
pipe() | mixed | |
getPageData() | Return the basic data for this page. | 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 | |
isPluginCompatible() | bool | |
postUpdateAction() | mixed | |
updateAction() | Extract zip file and update all files. | bool |
updateCore() | bool | |
updatePlugin() | bool | |
__construct() | Initialize all objects and properties. | mixed |
getTemplate() | Return the template to use for this controller. | string|bool |
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 |
validateFormToken() | Check request token. Returns an error if: - the token does not exist - the token is invalid - the token is duplicated | bool |
Properties
$extensions
Stores class extensions.
protected
static array
$extensions
= []
$pluginManager
private
PluginManager
$pluginManager
$telemetryManager
public
TelemetryManager
$telemetryManager
$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
$dataBase
It provides direct access to the database.
protected
DataBase
$dataBase
$empresa
Selected company.
public
Empresa
$empresa
$multiRequestProtection
public
MultiRequestProtection
$multiRequestProtection
$permissions
User permissions on this controller.
public
ControllerPermissions
$permissions
$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
$title
Title of the page.
public
string
$title
$uri
Given uri, default is empty.
public
string
$uri
$user
User logged in.
public
User|bool
$user
= false
Methods
__call()
Executes the first matched extension.
public
__call(
$name :
string
[, $arguments :
array
= [] ]
)
: mixed
Parameters
- $name : string
- $arguments : array = []
Tags
Return values
mixedaddExtension()
public
static addExtension(
$extension :
mixed
)
: mixed
Parameters
- $extension : mixed
Return values
mixedpipe()
public
pipe(
$name :
string
, ...$arguments :
array
)
: mixed
Parameters
- $name : string
- $arguments : array
Return values
mixedgetPageData()
Return the basic data for this page.
public
getPageData(
)
: array
Return values
arraygetCoreVersion()
Returns FacturaScripts core version.
public
getCoreVersion(
)
: float
Return values
floatprivateCore()
Runs the controller's private logic.
public
privateCore(
&$response :
Response
, $user :
User
, $permissions :
ControllerPermissions
)
: mixed
Parameters
- $response : Response
- $user : User
- $permissions : ControllerPermissions
Return values
mixedcancelAction()
Remove downloaded file.
private
cancelAction(
)
: mixed
Return values
mixeddownloadAction()
Download selected update.
private
downloadAction(
)
: mixed
Return values
mixedexecAction()
Execute selected action.
protected
execAction(
$action :
string
)
: mixed
Parameters
- $action : string
Return values
mixedgetUpdateItems()
private
getUpdateItems(
)
: array
Return values
arraygetUpdateItemsCore()
private
getUpdateItemsCore(
&$items :
array
, $projectData :
array
)
: mixed
Parameters
- $items : array
- $projectData : array
Return values
mixedgetUpdateItemsPlugin()
private
getUpdateItemsPlugin(
&$items :
array
, $pluginUpdate :
array
, $installedVersion :
float
)
: mixed
Parameters
- $items : array
- $pluginUpdate : array
- $installedVersion : float
Return values
mixedisPluginCompatible()
private
isPluginCompatible(
$plugin :
array
)
: bool
Parameters
- $plugin : array
Return values
boolpostUpdateAction()
private
postUpdateAction(
)
: mixed
Return values
mixedupdateAction()
Extract zip file and update all files.
private
updateAction(
)
: bool
Return values
boolupdateCore()
private
updateCore(
$zip :
ZipArchive
, $fileName :
string
)
: bool
Parameters
- $zip : ZipArchive
- $fileName : string
Return values
boolupdatePlugin()
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
mixedgetTemplate()
Return the template to use for this controller.
public
getTemplate(
)
: string|bool
Return values
string|boolpublicCore()
Execute the public part of the controller.
public
publicCore(
&$response :
Response
)
: mixed
Parameters
- $response : Response
Return values
mixedredirect()
Redirect to an url or controller.
public
redirect(
$url :
string
, $delay :
int
)
: mixed
Parameters
- $url : string
- $delay : int
Return values
mixedsetTemplate()
Set the template to use for this controller.
public
setTemplate(
$template :
string|bool
)
: bool
Parameters
- $template : string|bool
Return values
booltoolBox()
public
static toolBox(
)
: ToolBox
Return values
ToolBoxurl()
Return the URL of the actual controller.
public
url(
)
: string
Return values
stringcheckPHPversion()
private
checkPHPversion(
$min :
float
)
: mixed
Parameters
- $min : float
Return values
mixedgetClassName()
Return the name of the controller.
protected
getClassName(
)
: string
Return values
stringvalidateFormToken()
Check request token. Returns an error if: - the token does not exist - the token is invalid - the token is duplicated
protected
validateFormToken(
)
: bool