InstalledApp
abstract class InstalledApp extends BaseApp
Describes an app that needs database installation and has upgrade scripts for upgrading the database
Properties
| protected | $API | Reference to the main API, for convenience |
from BaseApp |
| static private | $metadata | from BaseApp | |
| protected | $config | ||
| protected | $database |
Methods
Returns an array of strings showing the CLI usage of the app
Return this app's BaseAppLog class name, if used (or null)
Loads a metadata for the given app with the given key
No description
No description
No description
Return the BaseConfig class for this app
Returns true if the user is allowed to install/upgrade
Returns the path of the app's code folder
No description
Details
at line 126
__construct(Main $API)
All apps are constructed when Andromeda runs
at line 170
mixed
Run(Input $input)
Checks if the client is running/needs to run install/upgrade {@inheritDoc}
at line 118
static array
getUsage()
Returns an array of strings showing the CLI usage of the app
in
BaseApp at line 47
abstract static string
getName()
No description
in
BaseApp at line 50
static protected string|null
getLogClass()
Return this app's BaseAppLog class name, if used (or null)
in
BaseApp at line 59
static protected
getMetadata(string $app, string $key)
Loads a metadata for the given app with the given key
Loads the app's JSON metadata file but not its code
in
BaseApp at line 77
static array
getAppRequires(string $app)
No description
in
BaseApp at line 83
static string
getAppApiVersion(string $app)
No description
in
BaseApp at line 89
static string
getVersion()
No description
in
BaseApp at line 95
commit()
Tells the app to commit any changes made outside the database
in
BaseApp at line 98
rollback()
Tells the app to rollback any changes made outside the database
at line 107
static protected string
getInstallFlags()
No description
at line 108
static protected string
getUpgradeFlags()
No description
at line 110
static protected array
getInstallUsage()
No description
at line 121
abstract static protected string
getConfigClass()
Return the BaseConfig class for this app
at line 144
protected bool
allowInstall()
Returns true if the user is allowed to install/upgrade
at line 151
static protected string
getTemplateFolder()
Returns the path of the app's code folder
at line 157
static protected array
getUpgradeScripts()
No description
at line 194
protected
Install(Input $input)
Installs the app by importing its SQL file and creating config
at line 207
protected
Upgrade(Input $input)
Iterates over the list of upgrade scripts, running them sequentially until the DB is up to date with the code