View Single Post
  #4 (permalink)  
Old 07-08-2009, 04:15 AM
paulipv paulipv is offline
Registered User
 
Join Date: Jul 2009
Posts: 19
paulipv is on a distinguished road
I've changed the structure.

There will be a WHM Loader class.

So will working something like this.

$conn = array (define the WHM connection);


$loader = new WHM_Loader();
$loader->setPath('path_to_whmclasses_folder');

// example;

$accouting = $loader->load('accouting' , $conn);
$accouting->create_acct( .... )
$accouting->modifyacct( .... )

$dns = $loader->load('dns' , $conn);
$dns->editzonerecord('domain_name','host' , $options=array());

// improved dns options
$dns->editArecord('domain_name','current_host',$options =array());

available options for function editArecord
new_ip
new_host
ttl

So will be very easy for people who wanna make a DNS manager interface.

$dns->editCNAMERecord( ... )
$dns->editMXRecord( ...)

// for cpanel.


$email = $loader->loadcp('email' , $conn);
$email->addforward( ... );
$email->listmxs( ... )

$ftp = $loader->loadcp('ftp' , $conn);
$ftp->listftpsessions( ... )
Reply With Quote