protected function _vcl_director_backend($host, $port, $probeUrl = '', $options = array())
{
$tpl = <<<EOS
{
.backend = {
.host = "{{host}}";
.port = "{{port}}";
{{probe}}
EOS;
$vars = array('host' => $host, 'port' => $port, 'probe' => '');
if (!empty($probeUrl)) {
$vars['probe'] = $this->_vcl_get_probe($probeUrl);
}
$str = $this->_formatTemplate($tpl, $vars);
foreach ($options as $key => $value) {
$str .= sprintf(' .%s = %s;', $key, $value) . PHP_EOL;
}
$str .= <<<EOS
}
}
EOS;
return $str;
}