From 114ab0988e20ac6be39ad363ff897a1a3b85e565 Mon Sep 17 00:00:00 2001
From: Razican
Note: CodeIgniter does not require you to use this class -since using pure PHP in your view pages lets them run a little faster. However, some developers prefer to use a template engine if +since using pure PHP in your view pages lets them run a little faster. However, some developers prefer to use a template engine if they work with designers who they feel would find some confusion working with PHP.
-Also Note: The Template Parser Class is not a +
Also Note: The Template Parser Class is not a full-blown template parsing solution. We've kept it very lean on purpose in order to maintain maximum performance.
@@ -102,7 +102,7 @@ full-blown template parsing solution. We've kept it very lean on purpose in ordeThis method accepts a template name and data array as input, and it generates a parsed version. Example:
+This method accepts a template name and data array as input, and it generates a parsed version. Example:
$this->load->library('parser');
@@ -114,11 +114,11 @@ $data = array(
$this->parser->parse('blog_template', $data);
The first parameter contains the name of the view file (in this example the file would be called blog_template.php), -and the second parameter contains an associative array of data to be replaced in the template. In the above example, the +and the second parameter contains an associative array of data to be replaced in the template. In the above example, the template would contain two variables: {blog_title} and {blog_heading}
-There is no need to "echo" or do something with the data returned by $this->parser->parse(). It is automatically -passed to the output class to be sent to the browser. However, if you do want the data returned instead of sent to the output class you can +
There is no need to "echo" or do something with the data returned by $this->parser->parse(). It is automatically +passed to the output class to be sent to the browser. However, if you do want the data returned instead of sent to the output class you can pass TRUE (boolean) to the third parameter:
$string = $this->parser->parse('blog_template', $data, TRUE);
@@ -130,8 +130,8 @@ pass TRUE (boolean) to the third parameter:
The above example code allows simple variables to be replaced. What if you would like an entire block of variables to be -repeated, with each iteration containing new values? Consider the template example we showed at the top of the page:
+The above example code allows simple variables to be replaced. What if you would like an entire block of variables to be +repeated, with each iteration containing new values? Consider the template example we showed at the top of the page:
<html>
<head>
--
cgit v1.2.3-24-g4f1b
From 4b9c62980599228f070b401c7673dce8085b0c61 Mon Sep 17 00:00:00 2001
From: Derek Jones
Date: Fri, 1 Jul 2011 17:40:48 -0500
Subject: backed out 648b42a75739, which was a NON-trivial whitespace commit.
It broke the Typography class's string replacements, for instance
---
user_guide/libraries/parser.html | 16 ++++++++--------
1 file changed, 8 insertions(+), 8 deletions(-)
(limited to 'user_guide/libraries/parser.html')
diff --git a/user_guide/libraries/parser.html b/user_guide/libraries/parser.html
index 4f04aaf48..cb2f100a2 100644
--- a/user_guide/libraries/parser.html
+++ b/user_guide/libraries/parser.html
@@ -83,10 +83,10 @@ variables or variable tag pairs. If you've never used a template engine, pseudo-
PHP from your templates (view files).
Note: CodeIgniter does not require you to use this class
-since using pure PHP in your view pages lets them run a little faster. However, some developers prefer to use a template engine if
+since using pure PHP in your view pages lets them run a little faster. However, some developers prefer to use a template engine if
they work with designers who they feel would find some confusion working with PHP.
-Also Note: The Template Parser Class is not a
+
Also Note: The Template Parser Class is not a
full-blown template parsing solution. We've kept it very lean on purpose in order to maintain maximum performance.
@@ -102,7 +102,7 @@ full-blown template parsing solution. We've kept it very lean on purpose in orde
$this->parser->parse()
-This method accepts a template name and data array as input, and it generates a parsed version. Example:
+This method accepts a template name and data array as input, and it generates a parsed version. Example:
$this->load->library('parser');
@@ -114,11 +114,11 @@ $data = array(
$this->parser->parse('blog_template', $data);
The first parameter contains the name of the view file (in this example the file would be called blog_template.php),
-and the second parameter contains an associative array of data to be replaced in the template. In the above example, the
+and the second parameter contains an associative array of data to be replaced in the template. In the above example, the
template would contain two variables: {blog_title} and {blog_heading}
-There is no need to "echo" or do something with the data returned by $this->parser->parse(). It is automatically
-passed to the output class to be sent to the browser. However, if you do want the data returned instead of sent to the output class you can
+
There is no need to "echo" or do something with the data returned by $this->parser->parse(). It is automatically
+passed to the output class to be sent to the browser. However, if you do want the data returned instead of sent to the output class you can
pass TRUE (boolean) to the third parameter:
$string = $this->parser->parse('blog_template', $data, TRUE);
@@ -130,8 +130,8 @@ pass TRUE (boolean) to the third parameter:
Variable Pairs
-The above example code allows simple variables to be replaced. What if you would like an entire block of variables to be
-repeated, with each iteration containing new values? Consider the template example we showed at the top of the page:
+The above example code allows simple variables to be replaced. What if you would like an entire block of variables to be
+repeated, with each iteration containing new values? Consider the template example we showed at the top of the page:
<html>
<head>
--
cgit v1.2.3-24-g4f1b