So i need your opinion about structure:
-> WHM_loader (loading WHM/cPanel functions)
-> WHM (main class, handle connection, query builder, etc)
classes( ::: API1 :::
-> Accounting (implements WHM, handle account functions
-> Dns (implements WHM, handle dns functions)
-> Package (implements WHM, handle package functions)
-> Reseller Functions (implements WHM, handle reseller functions)
-> Server Informations (implements WHM, handle server informations)
-> Server administration (implements WHM, handle server administration functions)
-> Service functions (implements WHM , handle service functions)
-> SSL functions (implements WHM , handle service functions)
::: API2 ::: (same as API1) implements WHM and handle all operations listed on
ApiTwo < AllDocumentation/AutomationIntegration < TWiki
WHM_Loader will be only need to be included and working as:
PHP Code:
include("WHM_Loader");
// Using the loader ...
$whm_loader = new WHM_Loader();
// 1.
$result = $whm_loader->accounting($conn)->createacct($data);
// 2.
$accounting = $whm->load('accounting',$conn);
$result = $accouting->createacct($data);
// Accounting class example:
class Accounting extends WHM {
function Accounting($conn) {
$this->conn($conn);
}
public function createacct() {
}
// etc...
}
if you want to add something to this, please let me know.