PHP 클래스 Nexcessnet_Turpentine_Model_Varnish_Admin_Socket

파일 보기 프로젝트 열기: nexcess/magento-turpentine 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_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

메소드 상세

__call() 공개 메소드

Methods provided: help [command] ping [timestamp] auth response banner stats vcl.load vcl.inline vcl.use vcl.discard vcl.list vcl.show param.show [-l] [] param.set purge.url purge [&& ]... purge.list
public __call ( string $name, array $args ) : array
$name string method name
$args array method args
리턴 array

__construct() 공개 메소드

auto-detect
public __construct ( array $options = [] )
$options array

_close() 보호된 메소드

Close the connection (if we're connected)
protected _close ( )

_command() 보호된 메소드

[_command description]
protected _command ( string $verb, integer $okCode = 200 ) : array
$verb string command name
$okCode integer code that indicates command was successful
리턴 array

_connect() 보호된 메소드

Establish a connection to the configured Varnish instance
protected _connect ( ) : boolean
리턴 boolean

_determineVersion() 보호된 메소드

protected _determineVersion ( string $bannerText )
$bannerText string

_read() 보호된 메소드

Read a response from Varnish instance
protected _read ( ) : array
리턴 array tuple of the response (code, text)

_translateCommandMethod() 보호된 메소드

Handle v2.1 <> v3.0 command compatibility
protected _translateCommandMethod ( string $verb ) : string
$verb string command to check
리턴 string

_write() 보호된 메소드

Write data to the Varnish instance, a newline is automatically appended
protected _write ( string $data )
$data string data to write

getConnectionString() 공개 메소드

Get the connection string for this socket (:)
public getConnectionString ( ) : string
리턴 string

getHost() 공개 메소드

Get the set host for this instance
public getHost ( ) : string
리턴 string

getPort() 공개 메소드

Get the port set for this instance
public getPort ( ) : integer
리턴 integer

getVersion() 공개 메소드

Find out what version mode we're running in
public getVersion ( ) : string
리턴 string

isConnected() 공개 메소드

Check if we're connected to Varnish
public isConnected ( ) : boolean
리턴 boolean

quit() 공개 메소드

Stop the Varnish instance
public quit ( )

setAuthSecret() 공개 메소드

Set the Varnish admin auth secret, use null to indicate there isn't one
public setAuthSecret ( string $authSecret = null )
$authSecret string

setHost() 공개 메소드

Set the Varnish host name/ip to connect to
public setHost ( string $host )
$host string hostname or ip

setPort() 공개 메소드

Set the Varnish admin port
public setPort ( integer $port )
$port integer

setTimeout() 공개 메소드

Set the timeout to connect to the varnish instance
public setTimeout ( integer $timeout )
$timeout integer

setVersion() 공개 메소드

Explicitly set the version of the varnish instance we're connecting to
public setVersion ( string $version )
$version string version from $_VERSIONS

start() 공개 메소드

Start running the Varnish child
public start ( )

status() 공개 메소드

Check if Varnish has a child running or not
public status ( ) : boolean
리턴 boolean

stop() 공개 메소드

Stop the running child (if it is running)
public stop ( )

프로퍼티 상세

$_VERSIONS 보호되어 있는 정적으로 프로퍼티

VCL config versions, should match config select values
protected static $_VERSIONS

$_authSecret 보호되어 있는 프로퍼티

protected $_authSecret

$_host 보호되어 있는 프로퍼티

protected $_host

$_port 보호되어 있는 프로퍼티

protected $_port

$_private 보호되어 있는 프로퍼티

protected $_private

$_timeout 보호되어 있는 프로퍼티

protected $_timeout

$_varnishConn 보호되어 있는 프로퍼티

Varnish socket connection
protected resource $_varnishConn
리턴 resource

$_version 보호되어 있는 프로퍼티

protected $_version