cPanel Functions

Class Methods

The following methods can be invoked on instances of this class.

init()

Initialize

getActiveDomain()

Returns the domain name which is active (staging / primary)

setServerOverride(string strServer)

Sets a server override

getServer()

Returns the host name of the server that controls this websites cpanel operations

setUser(string strUser)

Sets the current cpanel user
This is an internal function. See impersonateBegin.

setUserOverride(string strUser)

Sets the current cpanel user
This is an internal function. See impersonateBegin.

getUser()

Returns the username that this site is currently running under

setPasswordOverride(mixed strPassword)

setPassword(mixed strPassword)

Sets the current cPanel password

getPassword()

Returns the current cPanel password

testCredentials(mixed strServer, mixed strUser, string strPassword)

Ensures a cpanel username and password are valid

impersonateHelper(mixed strUser, mixed strCwd, mixed pDB)

Impersonation helper function

impersonateBegin(string strUser, mixed strDbUser, mixed strDbPassword, mixed strDBDatabase)

Begins assuming the environment of a cpanel user

impersonateEnd()

Ends impersonation

makeRemoteRequest(mixed strURL, mixed arrGET, mixed arrPOST, mixed strServer, mixed strUser, mixed strPassword)

Makes a remote request to Synergy 8's cpanel services

makeRemoteAPI1Call(mixed strModule, mixed strFunc, mixed arrParams, mixed strServer, mixed strUser, mixed strPassword)

makeRemoteAPI2Call(mixed strModule, mixed strFunc, mixed arrParams, mixed strServer, mixed strUser, mixed strPassword)

makeRemoteUAPICall(mixed strModule, mixed strFunc, mixed arrParams, mixed strServer, mixed strUser, mixed strPassword)

securityDisable(mixed bDisable)

securityTest()

__call(mixed strName, array arrArguments)

Magic function to trap calls to undefined functions and throw an exception rather than
a fatal error.

__callStatic(mixed strName, array arrArguments)

Magic function to trap static calls to undefined functions and throw an exception rather
than a fatal error.

classGetFolder()

Returns the folder where the class exists

__set_state(mixed arrValues)

classGetFolderResources()

Returns the folder where the class's resources exist

classGetSrcFile()

Returns the folder where the class exists

classGetSrcHash()

Returns the folder where the class exists

classGetReflection()

Returns the reflection data for the current class

classGetReflectionAnnotation(string strField)

Returns a specific class annotation for the current class