Beispiel #1
0
 private function _getDnsTemplate(Server_Package $p)
 {
     $params = array('action' => 'simplelist', 'resource' => 'dnstemplate');
     $result = $this->_makeRequest($params);
     if (isset($result['return']) && $result['return'] == 'error') {
         throw new Server_Exception('Can\'t find Dns template with name "' . $p->getName() . '". Go to Kloxo and create Dns template with this name');
     }
     $name = str_replace(' ', '_', $p->getName());
     foreach ($result['result'] as $key => $value) {
         if ($value == $name . '.dnst') {
             return $key;
         }
     }
     throw new Server_Exception('Can\'t find Dns template with name "' . $p->getName() . '". Go to Kloxo and create Dns template with this name');
 }
Beispiel #2
0
 /**
  * Change account package on server
  * @param Server_Account $a
  * @param Server_Package $p 
  */
 public function changeAccountPackage(Server_Account $a, Server_Package $p)
 {
     if ($a->getReseller()) {
         $this->getLog()->info('Updating reseller hosting account');
     } else {
         $this->getLog()->info('Updating shared hosting account');
     }
     $p->getName();
     $p->getQuota();
     $p->getBandwidth();
     $p->getMaxSubdomains();
     $p->getMaxParkedDomains();
     $p->getMaxDomains();
     $p->getMaxFtp();
     $p->getMaxSql();
     $p->getMaxPop();
     $p->getCustomValue('param_name');
 }
Beispiel #3
0
 private function _getPackageName(Server_Package $package)
 {
     $name = $package->getName();
     if ($this->_config['username'] != 'root') {
         $name = $this->_config['username'] . '_' . $name;
     }
     return $name;
 }
 private function _getPackageName(Server_Package $package)
 {
     $name = $package->getName();
     return $name;
 }