Свойство | Тип | Описание | |
---|---|---|---|
$_VERSIONS | VCL config versions, should match config select values | ||
$_authSecret | |||
$_host | |||
$_port | |||
$_private | |||
$_timeout | |||
$_varnishConn | resource | Varnish socket connection | |
$_version |
Метод | Описание | |
---|---|---|
__call ( string $name, array $args ) : array | Provide simple Varnish methods | |
__construct ( array $options = [] ) | auto-detect | |
getConnectionString ( ) : string |
Get the connection string for this socket ( |
|
getHost ( ) : string | Get the set host for this instance | |
getPort ( ) : integer | Get the port set for this instance | |
getVersion ( ) : string | Find out what version mode we're running in | |
isConnected ( ) : boolean | Check if we're connected to Varnish | |
quit ( ) | Stop the Varnish instance | |
setAuthSecret ( string $authSecret = null ) | Set the Varnish admin auth secret, use null to indicate there isn't one | |
setHost ( string $host ) | Set the Varnish host name/ip to connect to | |
setPort ( integer $port ) | Set the Varnish admin port | |
setTimeout ( integer $timeout ) | Set the timeout to connect to the varnish instance | |
setVersion ( string $version ) | Explicitly set the version of the varnish instance we're connecting to | |
start ( ) | Start running the Varnish child | |
status ( ) : boolean | Check if Varnish has a child running or not | |
stop ( ) | Stop the running child (if it is running) |
Метод | Описание | |
---|---|---|
_close ( ) | Close the connection (if we're connected) | |
_command ( string $verb, integer $okCode = 200 ) : array | [_command description] | |
_connect ( ) : boolean | Establish a connection to the configured Varnish instance | |
_determineVersion ( string $bannerText ) | ||
_read ( ) : array | Read a response from Varnish instance | |
_translateCommandMethod ( string $verb ) : string | Handle v2.1 <> v3.0 command compatibility | |
_write ( string $data ) | Write data to the Varnish instance, a newline is automatically appended |
protected _determineVersion ( string $bannerText ) | ||
$bannerText | string |
protected _translateCommandMethod ( string $verb ) : string | ||
$verb | string | command to check |
Результат | string |
public getConnectionString ( ) : string | ||
Результат | string |
public getVersion ( ) : string | ||
Результат | string |
public isConnected ( ) : boolean | ||
Результат | boolean |
public setAuthSecret ( string $authSecret = null ) | ||
$authSecret | string |
public setTimeout ( integer $timeout ) | ||
$timeout | integer |
public setVersion ( string $version ) | ||
$version | string | version from $_VERSIONS |
protected static $_VERSIONS |
protected resource $_varnishConn | ||
Результат | resource |