50 lines
1.1 KiB
PHP
50 lines
1.1 KiB
PHP
<?php
|
|
|
|
class ServerSwitch {
|
|
|
|
public function getConfig(){
|
|
if (!$this->switchConfig){
|
|
$this->initConfig();
|
|
}
|
|
return $this->switchConfig;
|
|
}
|
|
|
|
public function heroChainIsOpen(){
|
|
if ($this->getConfig()['heroChain'] > 0){
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
public function heroUpIsOpen(){
|
|
if ($this->getConfig()['heroUp'] > 0){
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
public function goldSynIsOpen(){
|
|
if ($this->getConfig()['goldSyn'] > 0){
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
public function heroPieceSynIsOpen(){
|
|
if ($this->getConfig()['heroPieceSyn'] > 0){
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
public function chipPieceSynIsOpen(){
|
|
if ($this->getConfig()['chipPieceSyn'] > 0){
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
private $switchConfig = null;
|
|
|
|
private function initConfig(){
|
|
$this->switchConfig = getServerSwitchConfig();
|
|
}
|
|
|
|
}
|