/** * Fix original item key to be compatible with cache storeage wrapper. * Used in some stores to fix not allowed chars usage in key name * * @param $key * @return mixed */ public function fixItemKey($key) { // not allowed characters: {}()/\@: return preg_replace('%[\\{\\}\\(\\)\\/@:\\\\]%', '-', parent::fixItemKey($key)); }
public function fixItemKey($key) { // allowed chars: "a-zA-Z0-9_\.! " return parent::fixItemKey(preg_replace(['%-+%', '%\\|+%', '%/+%', '%[^a-zA-Z0-9_\\.! ]+%'], ['_dash_', '_pipe_', '_ds_', '_'], $key)); }
public function tagKey($name) { return $this->store->itemKey($name); }