Common_Module

+------------------------------------------------------------+ | apnscp | +------------------------------------------------------------+ | Copyright (c) Apis Networks | +------------------------------------------------------------+ | Licensed under Artistic License 2.0 | +------------------------------------------------------------+ | Author: Matt Saladna (msaladna@apisnetworks.com) | +------------------------------------------------------------+
extends Module\Skeleton\Standard
Methods Summary
public
# __construct( )
void __construct (void)

ignore


Overrides

public
# service_exists( string $mSrvcType )
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.

privilege


public
# service_enabled( string $mSrvcType )
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.

privilege


public
# get_email( )
string get_email (void) Return the configured email address for a given user

privilege


public
# set_email( string $email )
Set email for active session
public
# get_admin_email( )
string get_admin_email (void) Returns the administrative e-mail associated to an account

privilege


public
# get_service_value( string $mSrvcType , string $mSrvcName = NULL, string $default = NULL )
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

privilege


public
public
# get_domain_expiration( string $domain = NULL )
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


public
public
# get_pod( $module )
public
public
# get_login_history( $limit = NULL )
public
# 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.

see

User_Module::get_disk_quota
public
public
# get_load( )
array get_load (void)

privilege


public
# get_services( )
array get_services() Returns an array of supported services

privilege


public
public
# get_postgresql_version( )
string get_postgresql_version() Fetches the query SELECT version(); from PostgreSQL

cache


privilege


public
# get_web_server_name( )
string get_web_server_name() Returns the Web server name

privilege


public
# get_ftp_server_name( )
string get_ftp_server_name() Returns the ftp server name

privilege


public
# get_mail_server_name( )
string get_mail_server_name() Returns the mail server name

privilege


public
# get_news_by_id( int $mID )
array get_news_by_id (int)

Deprecated


public
# get_news( int $mYear , int $mMonth , int $mDay )
array get_news(int, int, int)

Deprecated


public
# get_news_for_month( int $mYear , int $mMonth )
array get_news_for_month(int, int)

Deprecated


public
# get_news_types( )
array get_news_types (void)

Deprecated


public
# get_last_n_news( int $mNumber )
array get_last_n_news (integer)

Deprecated


public
# get_uptime( bool $mPrettyPrint = true )
string get_uptime([bool = false]) Returns the server uptime

privilege


public
# get_perl_modules( )
array get_perl_modules() Returns the list of Perl modules available to a user

privilege


public
# get_web_server_ip_addr( )
string get_web_server_ip_addr() Returns the IP address of the Web server

Deprecated


privilege


public
# get_ip_address( )
IP address of domain
public
# get_listening_ip_addr( )
int get_listening_ip_addr
public
# get_canonical_hostname( )
string get_canonical_hostname()
public
# get_kernel_version( )
string get_kernel_version()
public
# get_operating_system( )
string get_operating_system()
public
public
# list_pci_devices( )
string list_pci_devices() The call is equivalent to /sbin/lspci
public
# get_current_services( string|array $svc )
Parse committed service configuration\
public
# get_new_services( string|array $svc = NULL )
Parse service configuration from journal
public
public
# save_service_information_backend( array $services , bool $journal = false )
bool save_service_information_backend([bool = true])
public
# set_global_preferences( mixed $pref , mixed $key = NULL )
Set a preference to apply to all users
public
public
public
# set_timezone( string $zone )
Set timezone This is an API call. Use UCard::setPref() to set tz in app
public
# load_preferences( )
Load user preferences
public
# get_user_preferences( string $user )
Get preferences for user
public
public
# save_preferences( array $prefs )
public
# set_user_preferences( $user , array $prefs )
public
# get_timezone( $zone )
Get default timezone for user As with set_timezone, use UCard::getPref() in the CP
public
# get_base_path( )
Absolute filesystem base path
public
# _edit( )
public
Methods inherited from Module\Skeleton\Standard
__construct(), __wakeup(), autoloadModule(), setUserParameters(), cleanUserParameters(), setSessionId(), _invoke(), __debugInfo(), getExportedFunctions(), _reset(), getServices(), getNewServices(), getActiveServices(), getConfig(), getServiceValue(), setConfigJournal(), setConfig(), query(), _resetModule()
Constants Summary
public string GLOBAL_PREFERENCES_NAME
# '.global'
Constants inherited from Module\Skeleton\Standard
DEPENDENCY_MAP
Properties inherited from Module\Skeleton\Standard
$exportedFunctions, $username, $password, $domain, $user_id, $group_id, $permission_level, $session_id, $site, $site_id, $pgsql, $mysql