Methods |
public
|
__construct()
|
#
|
public
|
get_domains(): array
List all domains on the server
List all domains on the server
Throws
|
#
|
public
|
get_site_id_from_admin(string $admin): int|null
Get site ID from administrative user
Get site ID from administrative user
Throws
|
#
|
public
|
get_address_from_domain(string $domain): bool|string
Get e-mail from domain
Returns
address or false on error
Throws
|
#
|
public
|
get_site_id_from_domain(string $domain): null|int
Translate domain to id
|
#
|
public
|
get_email(): string|null
Get appliance admin email
Get appliance admin email
Multiple entries returned as array
|
#
|
public
|
set_email(string $email): bool
Set appliance admin email
Set appliance admin email
|
#
|
public
|
list_plans(): array|null
Get available plans
|
#
|
public
|
get_plan(null|string $plan = null): array|null
Get settings from plan
Parameters
Returns
plan information or null if missing
|
#
|
public
|
get_service_info(string $service = null, string|null $plan = null): array|null
Get listing of service variables
Get listing of service variables
Parameters
$service |
service name
|
$plan |
optional plan name
|
|
#
|
public
|
update_webapps(array $options = []): bool
Force bulk update of webapps
Force bulk update of webapps
|
#
|
public
|
list_failed_webapps(null|string $site = null): array
List all failed webapps
Parameters
$site |
restrict list to site
|
|
#
|
public
|
reset_webapp_failure(array $constraints = []): int
Reset failed apps
Parameters
$constraints |
[site: , version: , type: ]
|
|
#
|
public
|
locate_webapps(string|array $site = null): array
Locate webapps under site
Locate webapps under site
|
#
|
public
|
prune_webapps(string|array $site = null): void
Locate webapps under site
Locate webapps under site
|
#
|
public
|
delete_site(string $site, array $flags = []): bool
Delete site
Parameters
$site |
|null site identifier
|
$flags |
optional flags to DeleteDomain ("[since: "now"]" is --since=now, "[force: true]" is --force etc)
|
|
#
|
public
|
add_site(string $domain, string $admin, array $opts = [], array $flags = []): bool
Add site
Parameters
$domain |
domain name
|
$admin |
admin username
|
$opts |
service parameter adjustments, dot or nested format
|
$flags |
optional flags passed to AddDomain (e.g. "[n: true]" is -n)
|
|
#
|
public
|
edit_site(string $site, array $opts = [], array $flags = []): bool
Edit site
Parameters
$site |
site specifier
|
$opts |
service parameter adjustments, dot or nested format
|
$flags |
optional flags passed to EditDomain ("[n: true]" is -n, "[reset: true]" is --reset etc)
|
|
#
|
public
|
activate_site(string|array $site): bool
Activate site
|
#
|
public
|
deactivate_site(array|string $site, array $flags = []): bool
Alias to
|
#
|
public
|
suspend_site(string|array $site, array $flags = []): bool
Deactivate site
Parameters
$flags |
optional flags passed to SuspendDomain
|
|
#
|
public
|
hijack(string $site, string|null $user = null, string|null $gate = null): null|string
Hijack a user account
Hijack a user account
Replaces current session with new account session
Parameters
$gate |
authentication gate
|
|
#
|
public
|
get_storage(): array
Get server storage usage
|
#
|
public
|
get_site_storage(array $sites = []): array
Get storage used per site
Get storage used per site
|
#
|
public
|
get_usage(string $field = 'storage', array $sites = []): array
Get resource usage for site or collection of sites
Get resource usage for site or collection of sites
Parameters
$field |
resource type: storage, bandwidth
|
$sites |
optional list of site specifiers to restrict
|
|
#
|
public
|
collect(array|null $params = [], array|null $query = null, array $sites = []): array
Collect account info
Collect account info
"active" is a special $query param that picks active/inactive (true/false) sites
Parameters
$params |
null cherry-picks all services, [] uses default service list
|
$query |
pull sites that possess these service values
|
$sites |
restrict selection to sites
|
|
#
|
public
|
kill_site(string $site): bool
Destroy all logins matching site
Destroy all logins matching site
|
#
|
public
|
get_meta_from_site(string $site, string $service, string $class = null): array|bool|mixed|void
Get account metadata
|
#
|
public
|
get_meta_from_domain(string $domain, string $service, string $class = null)
|
#
|
public
|
activate_license(string $key): bool
Activate apnscp license
|
#
|
public
|
renew_license(): bool
Renew apnscp license
|
#
|
public
|
read_map(string $map): array
Read a map from mappings/
Read a map from mappings/
Parameters
|
#
|
public
|
create_from_meta(string|null $site, array $meta = []): string
Create an AddDomain command
Create an AddDomain command
Parameters
$meta |
meta passed as array or dot notation
|
|
#
|
public
|
_housekeeping()
|
#
|
public
|
bless(string $domain, string $user, array $creation = []): bool
Break an addon domain (or subdomain) into a new account
Break an addon domain (or subdomain) into a new account
Parameters
$creation |
creation arguments, dot-notation
|
|
#
|
public
|
_cron(Cronus $c)
|
#
|