PHP 클래스 Nexcessnet_Turpentine_Helper_Data

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
상속: extends Mage_Core_Helper_Abstract
파일 보기 프로젝트 열기: nexcess/magento-turpentine

보호된 프로퍼티들

프로퍼티 타입 설명
$_crypt Mage_Core_Model_Encryption encryption singleton thing

공개 메소드들

메소드 설명
cleanExplode ( string $token, string $data ) : array Like built-in explode() but applies trim to each exploded element and filters out empty elements from result
freeze ( mixed $data ) : string Serialize a variable into a string that can be used in a URL
generateUuid ( ) : string Generate a v4 UUID
getAutoApplyOnSave ( ) : boolean Check if Turpentine should apply the new VCL on config changes
getBypassCookieName ( ) : string Get the cookie name for the Varnish bypass
getCacheKeyHash ( array $key ) : string Hash a cache key the same way blocks do
getChildBlockNames ( Mage_Core_Model_Layout_Element $blockNode ) : array Get a list of child blocks inside the given block
getHmac ( string $data ) : string Get the HMAC hash for given data
getModelName ( string | object $model ) : string Get the getModel formatted name of a model classname or object
getStripVclWhitespace ( ) : string Get config value specifying when to strip VCL whitespaces
getVclFix ( ) : string Get config value specifying when to strip VCL whitespaces
getVersion ( ) : string Get the Turpentine version
secureHash ( string $data ) : string Get SHA256 hash of a string, salted with encryption key
shouldStripVclWhitespace ( string $action ) : boolean Check if VCL whitespaces should be stripped for the given action
thaw ( string $data ) : mixed Unserialize data
urlBase64Decode ( string $str ) : string Base64 decode a string, counterpart to urlBase64Encode
urlBase64Encode ( string $str ) : string Base64 encode a string
useFlashMessagesFix ( ) : boolean Check config to see if Turpentine should handle the flash messages
useProductListToolbarFix ( ) : boolean Check config to see if Turpentine should apply the product list toolbar fix

보호된 메소드들

메소드 설명
_getChildBlockNames ( Mage_Core_Model_Layout_Element $blockNode ) : array The actual recursive implementation of getChildBlockNames
_getCrypt ( ) : Mage_Core_Model_Encryption Get encryption singleton thing
_getCryptKey ( ) : string Get Magento's encryption key

메소드 상세

_getChildBlockNames() 보호된 메소드

The actual recursive implementation of getChildBlockNames
protected _getChildBlockNames ( Mage_Core_Model_Layout_Element $blockNode ) : array
$blockNode Mage_Core_Model_Layout_Element
리턴 array

_getCrypt() 보호된 메소드

Not using core/cryption because it auto-base64 encodes stuff which we don't want in this case
protected _getCrypt ( ) : Mage_Core_Model_Encryption
리턴 Mage_Core_Model_Encryption

_getCryptKey() 보호된 메소드

Get Magento's encryption key
protected _getCryptKey ( ) : string
리턴 string

cleanExplode() 공개 메소드

Like built-in explode() but applies trim to each exploded element and filters out empty elements from result
public cleanExplode ( string $token, string $data ) : array
$token string [description]
$data string [description]
리턴 array

freeze() 공개 메소드

Using gzdeflate to avoid the checksum/metadata overhead in gzencode and gzcompress
public freeze ( mixed $data ) : string
$data mixed
리턴 string

generateUuid() 공개 메소드

Generate a v4 UUID
public generateUuid ( ) : string
리턴 string

getAutoApplyOnSave() 공개 메소드

Check if Turpentine should apply the new VCL on config changes
public getAutoApplyOnSave ( ) : boolean
리턴 boolean

getBypassCookieName() 공개 메소드

Get the cookie name for the Varnish bypass
public getBypassCookieName ( ) : string
리턴 string

getCacheKeyHash() 공개 메소드

Hash a cache key the same way blocks do
public getCacheKeyHash ( array $key ) : string
$key array
리턴 string

getChildBlockNames() 공개 메소드

Get a list of child blocks inside the given block
public getChildBlockNames ( Mage_Core_Model_Layout_Element $blockNode ) : array
$blockNode Mage_Core_Model_Layout_Element
리턴 array

getHmac() 공개 메소드

Get the HMAC hash for given data
public getHmac ( string $data ) : string
$data string
리턴 string

getModelName() 공개 메소드

Get the getModel formatted name of a model classname or object
public getModelName ( string | object $model ) : string
$model string | object
리턴 string

getStripVclWhitespace() 공개 메소드

Get config value specifying when to strip VCL whitespaces
public getStripVclWhitespace ( ) : string
리턴 string

getVclFix() 공개 메소드

Get config value specifying when to strip VCL whitespaces
public getVclFix ( ) : string
리턴 string

getVersion() 공개 메소드

Get the Turpentine version
public getVersion ( ) : string
리턴 string

secureHash() 공개 메소드

Get SHA256 hash of a string, salted with encryption key
public secureHash ( string $data ) : string
$data string
리턴 string

shouldStripVclWhitespace() 공개 메소드

Check if VCL whitespaces should be stripped for the given action
public shouldStripVclWhitespace ( string $action ) : boolean
$action string can be either "apply", "save" or "download"
리턴 boolean

thaw() 공개 메소드

Unserialize data
public thaw ( string $data ) : mixed
$data string
리턴 mixed

urlBase64Decode() 공개 메소드

Base64 decode a string, counterpart to urlBase64Encode
public urlBase64Decode ( string $str ) : string
$str string
리턴 string

urlBase64Encode() 공개 메소드

NOTE this changes the last 2 characters to be friendly to URLs => . + => -
public urlBase64Encode ( string $str ) : string
$str string
리턴 string

useFlashMessagesFix() 공개 메소드

Check config to see if Turpentine should handle the flash messages
public useFlashMessagesFix ( ) : boolean
리턴 boolean

useProductListToolbarFix() 공개 메소드

Check config to see if Turpentine should apply the product list toolbar fix

프로퍼티 상세

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

encryption singleton thing
protected Mage_Core_Model_Encryption $_crypt
리턴 Mage_Core_Model_Encryption