WIP: Add Create Domain capability

This commit is contained in:
Miguel Nogueira
2019-01-30 13:39:28 +00:00
parent a8f089e3b2
commit c7bcaa2093
3 changed files with 51 additions and 16 deletions

View File

@@ -3,7 +3,7 @@
/*
*
* This class is part of the Application core logic, since it handles customer packages.
*
* TODO: Finish default packages
*/
class Package extends Application
{
@@ -19,14 +19,14 @@ class Package extends Application
const PACKAGE_UNLIMITED = "P_UNLIMITED";
// TODO: These values are subject to change, they should be pulled from config
private $allowedPackages =
[
"P_STARTER",
"P_SMALLCOMPANY",
"P_PROFESSIONAL",
"P_ENTERPRISE",
"P_UNLIMITED"
"P_STARTER" => 0,
"P_SMALLCOMPANY" => 152017738012172,
"P_PROFESSIONAL" => 152017787812438,
"P_ENTERPRISE" => 152017803412693,
"P_UNLIMITED" => 152017828912823
];
@@ -45,7 +45,7 @@ class Package extends Application
return
[
"desc" => "Created by Spacejewel Billing System",
"desc" => "Automatically created by Spacejewel Billing System",
"dir",
"unix",
"webmin",
@@ -55,10 +55,23 @@ class Package extends Application
"ssl",
"spam",
"virus",
"limits-from-plan"
"limits-from-plan" // apply limits from chosen plan.
];
}
// return features for each $package in an array format
public function selectPackage($package)
{
if (array_key_exists($package, $this->allowedPackages))
{
return
[
"--plan" => $this->allowedPackages[$package]
];
}
}
}