VarnishAdmin::__construct

(PECL varnish >= 0.3)

VarnishAdmin::__constructVarnishAdmin 构造函数

描述

public VarnishAdmin::__construct(array $args = ?)

参数

args

配置参数。可能的键是

VARNISH_CONFIG_IDENT - local varnish instance ident
VARNISH_CONFIG_HOST - varnish instance ip
VARNISH_CONFIG_PORT - varnish instance port
VARNISH_CONFIG_SECRET - varnish instance secret
VARNISH_CONFIG_TIMEOUT - connection read timeout
VARNISH_CONFIG_COMPAT - varnish major version compatibility

返回值

示例

示例 #1 VarnishAdmin::__construct() 示例

<?php
$args
= array(
VARNISH_CONFIG_HOST => "::1",
VARNISH_CONFIG_PORT => 6082,
VARNISH_CONFIG_SECRET => "5174826b-8595-4958-aa7a-0609632ad7ca",
VARNISH_CONFIG_TIMEOUT => 300,
);
$va = new VarnishAdmin($args);
?>
添加注释

用户贡献注释

此页面没有用户贡献的注释。
To Top