Skip to content

Commit 0489678

Browse files
committed
Update UG
1 parent b6c0655 commit 0489678

File tree

2 files changed

+10
-7
lines changed

2 files changed

+10
-7
lines changed

system/View/View.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ public function __construct(ViewConfig $config, string $viewPath = null, FileLoc
155155
* - cache Number of seconds to cache for
156156
* - cache_name Name to use for cache
157157
*
158-
* @param string $view The view contents
158+
* @param string $view File name of the view source
159159
* @param array $options Reserved for 3rd-party uses since
160160
* it might be needed to pass additional info
161161
* to other template engines.

user_guide_src/source/outgoing/view_renderer.rst

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,9 @@ Several options can be passed to the ``render()`` or ``renderString()`` methods:
102102
ignored for renderString()
103103
- ``saveData`` - true if the view data parameters should be retained for subsequent calls
104104

105+
.. note:: ``saveData`` as defined by the interface must be a boolean, but implementing
106+
classes (like ``View`` below) may extend this to include ``null`` values.
107+
105108
Class Reference
106109
***************
107110

@@ -110,9 +113,9 @@ Class Reference
110113
.. php:method:: render($view[, $options[, $saveData=false]])
111114
:noindex:
112115

113-
:param string $view: File name of the view source
114-
:param array $options: Array of options, as key/value pairs
115-
:param boolean $saveData: If true, will save data for use with any other calls, if false, will clean the data after rendering the view.
116+
:param string $view: File name of the view source
117+
:param array $options: Array of options, as key/value pairs
118+
:param boolean|null $saveData: If true, will save data for use with any other calls. If false, will clean the data after rendering the view. If null, uses the config setting.
116119
:returns: The rendered text for the chosen view
117120
:rtype: string
118121

@@ -123,9 +126,9 @@ Class Reference
123126
.. php:method:: renderString($view[, $options[, $saveData=false]])
124127
:noindex:
125128

126-
:param string $view: Contents of the view to render, for instance content retrieved from a database
127-
:param array $options: Array of options, as key/value pairs
128-
:param boolean $saveData: If true, will save data for use with any other calls, if false, will clean the data after rendering the view.
129+
:param string $view: Contents of the view to render, for instance content retrieved from a database
130+
:param array $options: Array of options, as key/value pairs
131+
:param boolean|null $saveData: If true, will save data for use with any other calls. If false, will clean the data after rendering the view. If null, uses the config setting.
129132
:returns: The rendered text for the chosen view
130133
:rtype: string
131134

0 commit comments

Comments
 (0)