app/code/community/Nexcessnet/Turpentine/Model/Varnish/Configurator/Abstract.php
protected function _vcl_director_backend($host, $port, $descriptor = '', $probeUrl = '', $options = array()) {
        $tpl = <<<EOS
    {
        .backend {$descriptor} = {
            .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;
    }
protected function _vcl_director_backend($host, $port, $descriptor = '', $probeUrl = '', $options = array()) {
        $tpl = <<<EOS
    {
        .backend {$descriptor} = {
            .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;
    }
protected function _vcl_director_backend ( $ host , $ port , $ descriptor = '' , $ probeUrl = '' , $ options = array ( ) ) { $ tpl =  <<<EOS
    {
        .backend {$descriptor} = {
            .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 ; }
Format a VCL backend declaration to put inside director

@param string $host     backend host
@param string $port     backend port
@param string $descriptor backend descriptor
@param string $probeUrl URL to check if backend is up
@param array  $options  extra options for backend
@return string
Format a VCL backend declaration to put inside director