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