contributions/page.cacheheaders/view/base/cacheheadersviewfactory.cls.php
Go to the documentation of this file.00001 <?php 00002 /** 00003 * Overload View Factory to create PageViews with overloaded cache headers 00004 * 00005 * @author Gerd Riesselmann 00006 * @ingroup CacheHeaders 00007 */ 00008 class ViewFactoryCacheHeaders extends ViewFactoryBase { 00009 00010 /** 00011 * Create a suitable view 00012 * 00013 * @param string $type The type of view to create e.g. "page", or "content", or "XML" ... 00014 * @param string $template_name Name of the template 00015 * @param mixed $params Params to pass to view, may depend on type 00016 * @return IView 00017 */ 00018 public function create_view($type, $template_name, $params) { 00019 if ($type == self::PAGE) { 00020 return new CacheHeadersPageView($params, $template_name); 00021 } 00022 return parent::create_view($type, $template_name, $params); 00023 } 00024 }