コード例 #1
0
 /**
  * @param \Emris\Cli\Scaler\Domain\Server $server
  * @return bool
  * @throws \RuntimeException
  */
 public function delServer(Server $server)
 {
     $url = $this->base . '/upstream_conf?remove=&upstream=' . $this->upstream . '&id=' . $server->getId();
     $contents = $this->_call($url);
     /** @noinspection IsEmptyFunctionUsageInspection */
     if (empty($contents)) {
         return false;
     }
     return true;
 }
コード例 #2
0
 /**
  * @param \Emris\Cli\Scaler\Domain\Server $server
  * @return mixed
  */
 public function buildFrom(Server $server)
 {
     $this->setId($server->getId());
     $this->setName($server->getName());
     return $this->build();
 }