|
TYPO3 API
SVNRelease
|
00001 <?php 00002 /*************************************************************** 00003 * Copyright notice 00004 * 00005 * (c) 2009 Jochen Rau <jochen.rau@typoplanet.de> 00006 * All rights reserved 00007 * 00008 * This class is a backport of the corresponding class of FLOW3. 00009 * All credits go to the v5 team. 00010 * 00011 * This script is part of the TYPO3 project. The TYPO3 project is 00012 * free software; you can redistribute it and/or modify 00013 * it under the terms of the GNU General Public License as published by 00014 * the Free Software Foundation; either version 2 of the License, or 00015 * (at your option) any later version. 00016 * 00017 * The GNU General Public License can be found at 00018 * http://www.gnu.org/copyleft/gpl.html. 00019 * 00020 * This script is distributed in the hope that it will be useful, 00021 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00022 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00023 * GNU General Public License for more details. 00024 * 00025 * This copyright notice MUST APPEAR in all copies of the script! 00026 ***************************************************************/ 00027 00028 /** 00029 * An empty view - a special case. 00030 * 00031 * @package Extbase 00032 * @subpackage MVC\View 00033 * @version $Id: EmptyView.php 1729 2009-11-25 21:37:20Z stucki $ 00034 * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General Public License, version 3 or later 00035 */ 00036 final class Tx_Extbase_MVC_View_EmptyView implements Tx_Extbase_MVC_View_ViewInterface { 00037 00038 /** 00039 * Dummy method to satisfy the ViewInterface 00040 * 00041 * @param Tx_Extbase_MVC_Controller_ControllerContext $controllerContext 00042 * @return void 00043 */ 00044 public function setControllerContext(Tx_Extbase_MVC_Controller_ControllerContext $controllerContext) { 00045 } 00046 00047 /** 00048 * Dummy method to satisfy the ViewInterface 00049 * 00050 * @param string $key 00051 * @param mixed $value 00052 * @return Tx_Extbase_MVC_View_EmptyView instance of $this to allow chaining 00053 * @api 00054 */ 00055 public function assign($key, $value) { 00056 return $this; 00057 } 00058 00059 /** 00060 * Dummy method to satisfy the ViewInterface 00061 * 00062 * @param array $values 00063 * @return Tx_Extbase_MVC_View_EmptyView instance of $this to allow chaining 00064 * @api 00065 */ 00066 public function assignMultiple(array $values) { 00067 return $this; 00068 } 00069 00070 /** 00071 * This view can be used in any case. 00072 * 00073 * @param Tx_Extbase_MVC_Controller_ControllerContext $controllerContext 00074 * @return boolean TRUE 00075 * @api 00076 */ 00077 public function canRender(Tx_Extbase_MVC_Controller_ControllerContext $controllerContext) { 00078 return TRUE; 00079 } 00080 00081 /** 00082 * Renders the empty view 00083 * 00084 * @return string An empty string 00085 */ 00086 public function render() { 00087 return '<!-- This is the output of the Empty View. An appropriate View was not found. -->'; 00088 } 00089 00090 /** 00091 * A magic call method. 00092 * 00093 * Because this empty view is used as a Special Case in situations when no matching 00094 * view is available, it must be able to handle method calls which originally were 00095 * directed to another type of view. This magic method should prevent PHP from issuing 00096 * a fatal error. 00097 * 00098 * @return void 00099 */ 00100 public function __call($methodName, array $arguments) { 00101 } 00102 } 00103 ?>
1.8.0