@@ -55,7 +55,7 @@ can instantiate it directly::
55
55
Then you can use any of the three standard rendering methods that it provides:
56
56
**render(viewpath, options, save) **, **setVar(name, value, context) ** and
57
57
**setData(data, context) **. You will also be able to specify delimiters directly,
58
- through the **setDelimiters(left,right) ** method.
58
+ through the **setDelimiters(left, right) ** method.
59
59
60
60
Using the ``Parser ``, your view templates are processed only by the Parser
61
61
itself, and not like a conventional view PHP script. PHP code in such a script
@@ -97,7 +97,7 @@ like this::
97
97
98
98
View parameters are passed to ``setData() `` as an associative
99
99
array of data to be replaced in the template. In the above example, the
100
- template would contain two variables: {blog_title} and {blog_heading}
100
+ template would contain two variables: `` {blog_title} `` and `` {blog_heading} ``
101
101
The first parameter to ``render() `` contains the name of the :doc: `view
102
102
file </outgoing/views>`, Where *blog_template * is the name of your view file.
103
103
@@ -177,8 +177,8 @@ at the top of the page::
177
177
</body>
178
178
</html>
179
179
180
- In the above code you'll notice a pair of variables: {blog_entries}
181
- data... {/blog_entries}. In a case like this, the entire chunk of data
180
+ In the above code you'll notice a pair of variables: `` {blog_entries} ``
181
+ data... `` {/blog_entries} `` . In a case like this, the entire chunk of data
182
182
between these pairs would be repeated multiple times, corresponding to
183
183
the number of rows in the "blog_entries" element of the parameters array.
184
184
@@ -252,7 +252,7 @@ The value for the pseudo-variable ``blog_entry`` is an associative
252
252
array. The key/value pairs defined inside it will be exposed inside
253
253
the variable pair loop for that variable.
254
254
255
- A `` blog_template `` that might work for the above::
255
+ A ** blog_template.php ** that might work for the above::
256
256
257
257
<h1>{blog_title} - {blog_heading}</h1>
258
258
{blog_entry}
@@ -696,7 +696,7 @@ Class Reference
696
696
697
697
.. php :class :: CodeIgniter\\View\\Parser
698
698
699
- .. php :method :: render($view[, $options[, $saveData= false]])
699
+ .. php :method :: render($view[, $options[, $saveData = false]])
700
700
701
701
:param string $view: File name of the view source
702
702
:param array $options: Array of options, as key/value pairs
@@ -720,7 +720,7 @@ Class Reference
720
720
Any conditional substitutions are performed first, then remaining
721
721
substitutions are performed for each data pair.
722
722
723
- .. php :method :: renderString($template[, $options[, $saveData= false]])
723
+ .. php :method :: renderString($template[, $options[, $saveData = false]])
724
724
725
725
:param string $template: View source provided as a string
726
726
:param array $options: Array of options, as key/value pairs
@@ -734,7 +734,7 @@ Class Reference
734
734
735
735
Options supported, and behavior, as above.
736
736
737
- .. php :method :: setData([$data[, $context= null]])
737
+ .. php :method :: setData([$data[, $context = null]])
738
738
739
739
:param array $data: Array of view data strings, as key/value pairs
740
740
:param string $context: The context to use for data escaping.
@@ -743,12 +743,12 @@ Class Reference
743
743
744
744
Sets several pieces of view data at once::
745
745
746
- $renderer->setData(['name'=> 'George', 'position'=> 'Boss']);
746
+ $renderer->setData(['name' => 'George', 'position' => 'Boss']);
747
747
748
748
Supported escape contexts: html, css, js, url, or attr or raw.
749
749
If 'raw', no escaping will happen.
750
750
751
- .. php :method :: setVar($name[, $value= null[, $context= null]])
751
+ .. php :method :: setVar($name[, $value = null[, $context = null]])
752
752
753
753
:param string $name: Name of the view data variable
754
754
:param mixed $value: The value of this view data
0 commit comments