CLI API Documentation

Axigen's PHP Command Line Interface API reference guide

List of all members.

Public Member Functions

  axigenVersion ()
  changePassword ($oldPassword, $newPassword)
  clearDomainActivationRequests ()
  configAacl ()
  configServer ()
  connect ($ip, $port, $username, $password, $secure=false, $timeout=0)
  createDomain ($domainName, $domainLocation, $postmasterPassword, $advanced=false)
  createSubDomain ($prefix, $parentDomain, $postmasterPassword, $advanced=false)
  deleteDomainLocation ($domain, $dontKeepCopy=false)
  deleteDomainName ($domain, $dontKeepCopy=false)
  disableDomain ($domain)
  disconnect ()
  editDomainLocation ($domainLocation)
  editDomainName ($domainName)
  enableDomainLocation ($domain)
  enableDomainName ($domain)
  getLastError ()
  getServerLastError ()
  getSessionObj ()
  listAllDomains ($filter= '')
  listDomainActivationRequests ()
  listDomains ($filter= '')
  listPremiumAccounts ($filter="", $domain="")
  purgeAccountFolders ($folders, $condition=null)
  purgePublicFolders ($folders, $condition=null)
  saveConfig ()
  showLicenseInfo ()
  showPremiumAddonsStatistics ()
  updateDomain ($domainName)
  version ()
  viewQueue ()

Member Function Documentation

Axigen::axigenVersion (  ) 

this method returns the Axigen version name

Returns:
string
Axigen::changePassword ( oldPassword,
newPassword  
)

this method changes the current user password

Returns:
bool
Parameters:
$oldPassword  string Admin user old password
$newPassword  string Admin user new password
Axigen::clearDomainActivationRequests (  ) 

this method clears the domain activation request list

Returns:
bool
Axigen::configAacl (  ) 

this function returns an object of AACL type

Returns:
object Aacl
Axigen::configServer (  ) 

this function returns an object of Server type

Returns:
object Server
Axigen::connect ( ip,
port,
username,
password,
secure = false,
timeout = 0  
)

this method is used to connect to the Axigen CLI

Note:
please make sure that you have set the CLI listener to be able to connect to the place you run the script from
Returns:
bool
Parameters:
$ip  string Axigen server ip address
$port  int Axigen server CLI port (default 7000)
$username  string admin username
$password  string admin password
$secure  bool SSL connection (this parameter is optional, default: false)
$timeout  int connection time out (this parameter is optional)
Axigen::createDomain ( domainName,
domainLocation,
postmasterPassword,
advanced = false  
)

this method creates a new domain

Returns:
bool/object DomainRegistration
Parameters:
$domainName  string the new domain name
$domainLocation  string location on disk
$postmasterPassword  string postmaster password
$advanced  bool if this is true, an object with the domain registration loaded will be returned, otherwise the command will be executed (default: false)
Axigen::createSubDomain ( prefix,
parentDomain,
postmasterPassword,
advanced = false  
)

this method creates a new sub-domain domain

Returns:
bool/object DomainRegistration
Parameters:
$prefix  string sub-domain name (prefix for the domain)
$parentDomain  string the parent domain for this sub-domain
$postmasterPassword  string postmaster password
$advanced  bool if this is true, an object with the domain registration loaded will be returned, otherwise the command will be executed (default: false)
Axigen::deleteDomainLocation ( domain,
dontKeepCopy = false  
)

deletes a domain from the server using the domain location

Returns:
bool
Parameters:
$domain  string the domain location to delete
$dontKeepCopy  bool delete the domain from you disk (optional, default: false)
Axigen::deleteDomainName ( domain,
dontKeepCopy = false  
)

deletes a domain from the server using the domain name

Returns:
bool
Parameters:
$domain  string the name of the domain to be deleted
$dontKeepCopy  bool delete the domain from disk (optional, default:false)
Axigen::disableDomain ( domain  ) 

disables a domain from the server using the domain name

Returns:
bool
Parameters:
$domain  string the name of the domain to disable
Axigen::disconnect (  ) 

close connection with the server

Note:
the connection with the server is closed on object destroy, so you don't need to explicit call disconnect
Axigen::editDomainLocation ( domainLocation  ) 

This function returns an object with the selected domain loaded by domain location

Returns:
object DomainRegistration
Parameters:
$domainLocation  string the domain location that you want to load
Axigen::editDomainName ( domainName  ) 

This function returns an object with the selected domain loaded by name

Returns:
object DomainRegistration
Parameters:
$domainName  string the domain name that you want to load
Axigen::enableDomainLocation ( domain  ) 

enables a domain from the server using the domain location

Returns:
bool
Parameters:
$domain  string the domain location to enable
Axigen::enableDomainName ( domain  ) 

enables a domain from the server using the domain name

Returns:
bool
Parameters:
$domain  string the name of the domain to enable
Axigen::getLastError (  ) 

this function returns an array with the last error

Returns:
array
Axigen::getServerLastError (  ) 

this function returns the last error generated by the server

Returns:
string
Axigen::listAllDomains ( filter = ''  ) 

this method returns an array with the all domains list filtered by parameter

Returns:
array
Parameters:
$filter  string the domain filter (ex: domain*: will list all domains that start with domain) (this parameter is optional)
Axigen::listDomainActivationRequests (  ) 

this method returns an array with domain activation requests

Returns:
array
Axigen::listDomains ( filter = ''  ) 

this method returns an array with the enabled domains list filtered by parameter

Returns:
array
Parameters:
$filter  string the domain filter (ex: domain*: will list all domains that start with domain) (this parameter is optional)
Axigen::listPremiumAccounts ( filter = "",
domain = ""  
)

this method returns an array with Premium Accounts list filtered by a certain parameter

Returns:
array
Parameters:
$filter  string the Premium account filter (ex: account*: will list all the accounts that start with account) (this parameter is optional)
$domain  string the domain filter (optional)
Axigen::purgeAccountFolders ( folders,
condition = null  
)

purge mails from specified folders of all users from all enabled domains

Parameters:
$folders  string the folders to purge (list is separated by , and names with spaces are between brackets)
$condition  string the purge condition (optional, default: ALL)
Returns:
bool
Axigen::purgePublicFolders ( folders,
condition = null  
)

purge mails from specified public folders from all enabled domains

Parameters:
$folders  string the public folders to purge (list is separated by , and names with spaces are between brackets)
$condition  string the purge condition (optional, default: ALL)
Returns:
bool
Axigen::saveConfig (  ) 

this method saves the Axigen Configuration on disk

Returns:
bool
Axigen::showLicenseInfo (  ) 

this function returns an array with the license info

Returns:
array
Axigen::showPremiumAddonsStatistics (  ) 

this function returns an array with the PremiumAddonsStatistics

Returns:
array
Axigen::updateDomain ( domainName  ) 
Returns:
object returns a Domain object with the selected domain loaded
Parameters:
$domainName  string the name of the domain you want to load
Axigen::version (  ) 

returns an array with PHP files and the Cliclient library version

Returns:
array
Axigen::viewQueue (  ) 

this function returns an object of Queue type

Returns:
object Queue