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
Показать файл Открыть проект

Защищенные свойства (Protected)

Свойство Тип Описание
$_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
public useProductListToolbarFix ( ) : boolean
Результат boolean

Описание свойств

$_crypt защищенное свойство

encryption singleton thing
protected Mage_Core_Model_Encryption $_crypt
Результат Mage_Core_Model_Encryption