CoreApp
class CoreApp extends InstalledApp
Server management/info app included with the framework.
Handles DB config, install, and getting/setting config/logs.
Properties
| protected | $API | Reference to the main API, for convenience |
from BaseApp |
| static private | $metadata | from BaseApp | |
| protected | $config | from InstalledApp | |
| protected | $database | from InstalledApp |
Methods
Returns an array of strings showing the CLI usage of the app
No description
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
Return the BaseConfig class for this app
Returns the path of the app's code folder
No description
Creates a new emailer config
Details
in
InstalledApp at line 126
__construct(Main $API)
All apps are constructed when Andromeda runs
at line 120
mixed
Run(Input $input)
Checks if the client is running/needs to run install/upgrade {@inheritDoc}
at line 71
static array
getUsage()
Returns an array of strings showing the CLI usage of the app
at line 41
static string
getName()
No description
at line 43
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
at line 49
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
in
InstalledApp at line 107
static protected string
getInstallFlags()
No description
in
InstalledApp at line 108
static protected string
getUpgradeFlags()
No description
at line 58
static protected array
getInstallUsage()
No description
at line 45
static protected string
getConfigClass()
Return the BaseConfig class for this app
in
InstalledApp at line 144
protected bool
allowInstall()
Returns true if the user is allowed to install/upgrade
at line 51
static protected string
getTemplateFolder()
Returns the path of the app's code folder
at line 53
static protected array
getUpgradeScripts()
No description
at line 230
protected
Install(Input $input)
Installs the app by importing its SQL file and creating config
at line 257
protected
Upgrade(Input $input)
Iterates over the list of upgrade scripts, running them sequentially until the DB is up to date with the code
at line 47
protected Config
GetConfig()
No description
at line 195
protected array
GetUsages(Input $input)
Collects usage strings from every installed app and returns them
at line 213
protected string|null
ConfigDB(Input $input, bool $isAdmin)
Creates a database config with the given input
at line 273
array
ListApps(Input $input, bool $isAdmin)
No description
at line 282
protected void
PHPInfo(Input $input, bool $isAdmin)
Prints the phpinfo() page
at line 301
protected array
ServerInfo(Input $input, bool $isAdmin)
Gets miscellaneous server identity information
at line 323
protected void
TestMail(Input $input, bool $isAdmin, $authenticator, AccessLog|null $accesslog)
Sends a test email via a given mailer
at line 356
protected array
EnableApp(Input $input, bool $isAdmin, AccessLog|null $accesslog)
Registers (enables) an app
at line 374
protected array
DisableApp(Input $input, bool $isAdmin, AccessLog|null $accesslog)
Unregisters (disables) an app
at line 390
protected array
RunGetConfig(Input $input, bool $isAdmin)
Loads server config
at line 400
protected array
GetDBConfig(Input $input, bool $isAdmin)
Loads server DB config
at line 413
protected array
RunSetConfig(Input $input, bool $isAdmin, AccessLog|null $accesslog)
Sets server config
at line 426
protected array
GetMailers(Input $input, bool $isAdmin)
Returns a list of the configured mailers
at line 440
protected array
CreateMailer(Input $input, bool $isAdmin, $authenticator, AccessLog|null $accesslog)
Creates a new emailer config
at line 463
protected void
DeleteMailer(Input $input, bool $isAdmin, AccessLog|null $accesslog)
Deletes a configured emailer
at line 482
protected array
GetErrors(Input $input, bool $isAdmin)
Returns the server error log, possibly filtered
at line 495
protected int
CountErrors(Input $input, bool $isAdmin)
Counts server error log entries, possibly filtered
at line 508
protected array
GetRequests(Input $input, bool $isAdmin)
Returns all request logs matching the given input
at line 530
protected int
CountRequests(Input $input, bool $isAdmin)
Counts all request logs matching the given input
at line 543
protected array
GetAllActions(Input $input, bool $isAdmin)
Returns all action logs matching the given input
at line 565
protected int
CountAllActions(Input $input, bool $isAdmin)
Counts all action logs matching the given input
at line 579
protected array
GetActions(Input $input, bool $isAdmin)
Returns all app action logs matching the given input
at line 609
protected int
CountActions(Input $input, bool $isAdmin)
Counts all app action logs matching the given input