Methods |
public
|
service_exists(string $service): bool
bool service_exists(string)
bool service_exists(string)
Checks to see if a service exists on the server. If the service
does not exist, return false, otherwise return true.
Returns
true if the service exists, false otherwise
|
#
|
public
|
service_enabled(string $service): bool
bool service_enabled(string)
bool service_enabled(string)
Checks to see if a service is enabled for a given role. If the service
is not enabled, return false, otherwise return true.
Parameters
$service |
type of service to lookup
|
Returns
true if service exists and is enabled, false if it does
not exist OR apnscpException if the service does not
exist on the server.
|
#
|
public
|
get_email(): string|null
string get_email (void)
string get_email (void)
Return the configured email address for a given user
|
#
|
public
|
get_admin_email(): string
string get_admin_email (void)
string get_admin_email (void)
Returns the administrative e-mail associated to an account
Returns
administrative e-mail address
|
#
|
public
|
get_user_preferences(string $user): array|false
Get preferences for user
|
#
|
public
|
set_email(string $email): bool
Set email for active session
Set email for active session
|
#
|
public
|
get_service_value(string $mSrvcType, string $mSrvcName = null, string $default = null): mixed
mixed get_service_value (string, string)
mixed get_service_value (string, string)
Returns the corresponding value to a service type and service name
if it exists, otherwise false if it does not exist
Parameters
$mSrvcType |
The type of service to lookup
|
$mSrvcName |
A name of a corresponding value for a named
service in $mSrvcType
|
$default |
Optional default if svc type/name not set
|
|
#
|
public
|
get_admin_username()
|
#
|
public
|
get_domain_expiration(string $domain = null): int
int get_domain_expiration(string)
int get_domain_expiration(string)
Retrieves the domain expiration timestamp for a given domain. Certain
domains are ineligible for the lookup as the registrar blocks out
expiration data. The known TLDs are as follows:
*.ws
*.mx
*.au
*.tk
Deprecated
@see Dns_Module::domain_expiration()
Returns
expiration as seconds since epoch
|
#
|
public
|
get_php_version()
|
#
|
public
|
get_pod($module)
|
#
|
public
|
get_last_login()
|
#
|
public
|
get_login_history(int $limit = null): array
|
#
|
public
|
get_disk_quota(): array
array get_disk_quota()
array get_disk_quota()
Returns the disk quota for a given account
two doubles packed in an associative array with indexes
"used" and "total", the difference of indexes "total" and "used" represent
your free disk quota. Depending upon the user calling it, it will
either contain your total site's quota usage and limit or a user's
quota and limit. If you are calling this through SOAP, please see
the Site_Module::get_disk_quota_user() function for user-specific
quota retrieval. If there is no quota -- which will not happen,
but is there for backwards compatibility -- the returned value
for total will be NULL.
|
#
|
public
|
get_mysql_version(): int|string
Get MySQL version
|
#
|
public
|
get_load(): array
array get_load (void)
Returns
returns an assoc array of the 1, 5, and 15 minute
load averages; indicies of 1,5,15
|
#
|
public
|
get_services(): array
array get_services()
Returns an array of supported services
array get_services()
Returns an array of supported services
Returns
all services and corresponding values
|
#
|
public
|
get_perl_version(): string
|
#
|
public
|
get_postgresql_version(): string|int
string get_postgresql_version()
string get_postgresql_version()
Fetches the query SELECT version(); from PostgreSQL
Returns
|
#
|
public
|
get_web_server_name(): string
string get_web_server_name()
Returns the Web server name
string get_web_server_name()
Returns the Web server name
Returns
|
#
|
public
|
get_ftp_server_name(): string
string get_ftp_server_name()
Returns the ftp server name
string get_ftp_server_name()
Returns the ftp server name
Returns
|
#
|
public
|
get_mail_server_name(): string
string get_mail_server_name()
Returns the mail server name
string get_mail_server_name()
Returns the mail server name
Returns
|
#
|
public
|
whoami(): string
Get username
|
#
|
public
|
get_uptime(bool $pretty = true): int|string
string get_uptime([bool = false])
Returns the server uptime
string get_uptime([bool = false])
Returns the server uptime
Parameters
$pretty |
return data as string (true) or int (false)
|
Returns
|
#
|
public
|
get_perl_modules(): array
array get_perl_modules()
Returns the list of Perl modules available to a user
array get_perl_modules()
Returns the list of Perl modules available to a user
Returns
list of modules available
|
#
|
public
|
get_web_server_ip_addr(): string
string get_web_server_ip_addr()
string get_web_server_ip_addr()
Returns the IP address of the Web server
Deprecated
Returns
IP address of the Web server
|
#
|
public
|
get_ip_address(): array
IP address of domain
|
#
|
public
|
get_ip6_address(): array
IPv6 address of domain
|
#
|
public
|
get_listening_ip_addr(): string
int get_listening_ip_addr
int get_listening_ip_addr
Returns
primary ip address bound to server
|
#
|
public
|
get_canonical_hostname(): string
string get_canonical_hostname()
string get_canonical_hostname()
Returns
get_canonical hostname of the server
|
#
|
public
|
get_kernel_version(): string
string get_kernel_version()
string get_kernel_version()
|
#
|
public
|
get_operating_system(): string
string get_operating_system()
string get_operating_system()
|
#
|
public
|
get_processor_information(): array
|
#
|
public
|
list_pci_devices(): string
string list_pci_devices()
The call is equivalent to /sbin/lspci
string list_pci_devices()
The call is equivalent to /sbin/lspci
Returns
|
#
|
public
|
get_current_services(string|array $svc): array
Parse committed service configuration\
Parse committed service configuration\
|
#
|
public
|
get_new_services(string|array $svc = null): array
Parse service configuration from journal
Parse service configuration from journal
|
#
|
public
|
get_old_services($svc): array
|
#
|
public
|
save_service_information_backend(array $services, bool $journal = false): bool
bool save_service_information_backend([bool = true])
bool save_service_information_backend([bool = true])
Parameters
$journal |
sync configuration change to master configuration.
If the supplied parameter is false, then the new
configuration value will be commited to the journal
requiring EditVirtDomain to be called
|
|
#
|
public
|
set_global_preferences(mixed $pref, mixed $key): bool
Set a preference to apply to all users
Set a preference to apply to all users
Parameters
$pref |
array or string representing many or a single pref
|
$key |
null to remove preference otherwise set single pref to this value
|
|
#
|
public
|
lock_global_preferences(string $key): bool
|
#
|
public
|
unlock_global_preferences(string $key): bool
|
#
|
public
|
set_language(string $language): bool
Set language
|
#
|
public
|
set_timezone(string $zone): bool
Set timezone
Set timezone
This is an API call. Use UCard::setPref() to set tz in app
Parameters
|
#
|
public
|
load_preferences(): array
Load user preferences
|
#
|
public
|
get_global_preferences(): array
|
#
|
public
|
purge_preferences(): bool
Purge all saved preferences
Purge all saved preferences
|
#
|
public
|
set_preference(string $key, $value): bool
Set single preference
|
#
|
public
|
save_preferences(array $prefs): bool
|
#
|
public
|
set_user_preferences(string $user, array $prefs): bool
|
#
|
public
|
get_timezone(): string
Get default timezone for user
Get default timezone for user
As with set_timezone, use UCard::getPref() in the CP
|
#
|
public
|
get_language(): string
Report current language
|
#
|
public
|
get_base_path(): string
Absolute filesystem base path
Absolute filesystem base path
|
#
|
public
|
_edit()
|
#
|
public
|
_housekeeping()
|
#
|