IP.Board  3.3.0
hostingServer Class Reference

Abstract Hosting Server Model. More...

Inheritance diagram for hostingServer:
server_cpanel server_none

Public Member Functions

 __construct ($data=array())
 _makePassword ($length=12)
 _makeUsername ($domain, $length=8)
 checkForAccount ($username)
 createAccount ($package, $domain, $customer)
 getLoad ()
 listAccounts ()
 logError ($message)
 reboot ()
 resendFailedApiCall ($data)
 touch ()

Detailed Description

Abstract Hosting Server Model.


Constructor & Destructor Documentation

__construct ( data = array())

Constructor - sets data

Parameters:
array$dataData from nexus_hosting_servers
Returns:
void

Reimplemented in server_cpanel.


Member Function Documentation

_makePassword ( length = 12)

Generate Random password

Parameters:
string$lengthLength (in characters)
Returns:
string Password
_makeUsername ( domain,
length = 8 
)

Generate Username from Domain

Parameters:
string$domainDomain
string$lengthLength (in characters)
Returns:
string Username
checkForAccount ( username) [abstract]

Check for account

Parameters:
string$usernameUsername
Returns:
string Domain
Exceptions:
Exception

Reimplemented in server_cpanel, and server_none.

createAccount ( package,
domain,
customer 
) [abstract]

Create Account

Parameters:
package$packagepackage object
string$domainDomain
customer$customerCustomer object
Returns:
array Username and password

Reimplemented in server_none.

getLoad ( ) [abstract]

Get load

Returns:
int Load over last 15 minutes
Exceptions:
Exception

Reimplemented in server_cpanel, and server_none.

listAccounts ( ) [abstract]

List Accounts

Returns:
array List of accounts - key is username, value is array containing domain, disklimit, diskused and active
Exceptions:
Exception

Reimplemented in server_cpanel, and server_none.

logError ( message)

Log Error

Parameters:
string$messageError Message
Returns:
void
reboot ( ) [abstract]

Reboot Server

Exceptions:
Exception

Reimplemented in server_cpanel, and server_none.

resendFailedApiCall ( data) [abstract]

Resend Failed API Call

Parameters:
mixed$dataData that was captured at error time
Exceptions:
Exception

Reimplemented in server_cpanel, and server_none.

touch ( ) [abstract]

Test Connection

Exceptions:
Exception

Reimplemented in server_cpanel, and server_none.


The documentation for this class was generated from the following file:
 All Data Structures Functions Variables