class Blockmanager
Serves for managing blocks of page content, uploading classes, rendering, caching , as well as for block cache invalidation.
DVelum 0.8 x
class Blockmanager { /** * Use the main configuration file of the frontend_hardcache application * to define the lifetime of the block cache. * It allows to reduce the lifetime of the block cache * if the number of triggers for cache invalidation is not enough * @param boolean $flag */ static public function useHardCacheTime($flag) /** * Instantiate block manager * @return Blockmanager */ static public function getInstance() /** * Run block invalidation * @param string $pageId — page identifier * @param boolean - optional, use default blocks map * @return void */ public function init($pageId, $defaultMap = false) /** * Get the cache key for the block based on the class and configuration * @param string $class - block class * @param array $config - block config * @return string */ static public function getCacheKey($class, array $config) /** * Get HTML — block performance results for a certain placeholder * specified in the blocks map configuration * @param string $placeCode — код контейнера * @return string */ public function getBlocksHtml($placeCode) /** * Get the cache key for the blocks displayed on the page * the system method * @param integer $id — page identifier * @return string */ static public function hashPage($id) /** * Invalidate cache by block class * @param string $blockClass — block class */ static public function invalidateCacheBlockClass($blockClass) /** * Invalidate cache by block identifier (for all pages) * @param integer $blockId */ static public function invalidateCacheBlockId($blockId) /** * Invalidate cache by menu identifier (for all pages) * @param integer $menuId */ static public function invalidateCacheBlockMenu($menuId) /** * Invalidate cache of the block map by default (for all pages) */ static public function invalidateDefaultMap() /** * Invalidate cache of the page blocks * @param integer $pageId — page identifier */ static public function invalidatePageMap($pageId) }
DVelum 0.9 x
class Blockmanager { /** * Set default cache adapter * @param Cache_Interface $cache */ static public function setDefaultCache(Cache_Interface $cache) /** * Set cache adapter for the current object * @param Cache_Interface $cache */ public function setCache(Cache_Interface $cache) /** * Disable cache */ public function disableCache() /** * Use hard cache expiration time from main config for blocks cache * It will decrease the block cache lifetime * if the number of cache invalidation triggers is not enough * @param boolean $flag */ static public function useHardCacheTime($flag) /** * Initialize blocks * @param string $pageId - page identifier * @param boolean - optional, use default blocks map * @param boolean - optional, object version * @return void */ public function init($pageId, $defaultMap = false , $version = false) /** * Get cache key for a block as per the class and configuration settings * @param string $class - block class * @param array $config - block config * @return string */ public function getCacheKey($class, array $config) /** * Get the HTML code generated by blocks for a placeholder specified in the block map configuration * @param string $placeCode - container code * @return string */ public function getBlocksHtml($placeCode) /** * Get cache key for the blocks located on the page * A system method * @param integer $id - page identifier * @return string */ public function hashPage($id) /** * Invalidate block cache by block class (for all pages) * @param string $blockClass - block class */ public function invalidateCacheBlockClass($blockClass) /** * Invalidate block cache by block id (for all pages) * @param integer $blockId */ public function invalidateCacheBlockId($blockId) /** * Invalidate cache by menu id (for all pages) * @param integer $menuId */ public function invalidateCacheBlockMenu($menuId) /** * Invalidate cache for default block map (for all pages) */ public function invalidateDefaultMap() /** * Invalidate cache for page blocks * @param integer $pageId - page identifier */ public function invalidatePageMap($pageId) }comments powered by Disqus