Skip to content

Commit 2b530fe

Browse files
committed
docs: add "Setting View Parameters" section
1 parent ba63308 commit 2b530fe

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

user_guide_src/source/outgoing/view_renderer.rst

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,20 @@ script. You will have to give each escaped value a unique parameter name.
4646
No special meaning is attached to parameters whose value is an array. It is up
4747
to you to process the array appropriately in your PHP code.
4848

49+
Setting View Parameters
50+
=======================
51+
52+
The :php:meth:`setVar() <CodeIgniter\\View\\View::setVar()>` method sets a view parameter.
53+
54+
.. literalinclude:: view_renderer/008.php
55+
:lines: 2-
56+
57+
The :php:meth:`setData() <CodeIgniter\\View\\View::setData()>` method sets multiple view
58+
parameters at once.
59+
60+
.. literalinclude:: view_renderer/007.php
61+
:lines: 2-
62+
4963
Method Chaining
5064
===============
5165

0 commit comments

Comments
 (0)