NullView.php
1 <?php
2 /**
3  * wCMF - wemove Content Management Framework
4  * Copyright (C) 2005-2020 wemove digital solutions GmbH
5  *
6  * Licensed under the terms of the MIT License.
7  *
8  * See the LICENSE file distributed with this work for
9  * additional information.
10  */
12 
14 
15 /**
16  * NullView is a stub class that implements all view methods.
17  *
18  * @author ingo herwig <ingo@wemove.com>
19  */
20 class NullView implements View {
21 
22  /**
23  * @see View::setValue()
24  */
25  public function setValue($name, $value) {}
26 
27  /**
28  * @see View::getValue()
29  */
30  public function getValue($name) {
31  return null;
32  }
33 
34  /**
35  * @see View::getValues()
36  */
37  public function getValues() {
38  return [];
39  }
40 
41  /**
42  * @see View::clearAllValues()
43  */
44  public function clearAllValues() {}
45 
46  /**
47  * @see View::display()
48  */
49  public function render($tplFile, $cacheId=null, $cacheLifetime=null, $display=true) {
50  if (!$display) {
51  return '';
52  }
53  }
54 
55  /**
56  * @see View::clearCache()
57  */
58  public static function clearCache($tplFile=null, $cacheId=null) {
59  return 0;
60  }
61 
62  /**
63  * @see View::isCached()
64  */
65  public static function isCached($tplFile, $cacheId=null) {
66  return false;
67  }
68 
69  /**
70  * @see View::getCacheDate()
71  */
72  public static function getCacheDate($tplFile, $cacheId=null) {
73  return null;
74  }
75 
76  /**
77  * @see View::getTemplate()
78  */
79  public static function getTemplate($controller, $context, $action) {
80  return null;
81  }
82 }
83 ?>
static getTemplate($controller, $context, $action)
Definition: NullView.php:79
NullView is a stub class that implements all view methods.
Definition: NullView.php:20
static clearCache($tplFile=null, $cacheId=null)
Definition: NullView.php:58
View defines the interface for all view implementations.
Definition: View.php:18
static getCacheDate($tplFile, $cacheId=null)
Definition: NullView.php:72
static isCached($tplFile, $cacheId=null)
Definition: NullView.php:65
render($tplFile, $cacheId=null, $cacheLifetime=null, $display=true)
Definition: NullView.php:49