reference/yaf/tutorials.xml
198f577cb09d61622267f7480b7ec180c7d714da
...
...
@@ -4,10 +4,9 @@
4
4
<chapter xml:id="yaf.tutorials" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
5
&reftitle.examples;
6
6

7
-
<section role="examples">
8
-
<example>
9
-
<title>A classic Application directory layout</title>
10
-
<screen>
7
+
<example>
8
+
<title>A classic Application directory layout</title>
9
+
<screen>
11
10
<![CDATA[
12
11
- index.php
13
12
- .htaccess
...
...
@@ -25,11 +24,9 @@
25
24
- models
26
25
- plugins
27
26
]]>
28
-
</screen>
29
-
</example>
30
-
</section>
27
+
</screen>
28
+
</example>
31
29

32
-
<section role="examples">
33
30
<example>
34
31
<title>Entry</title>
35
32
<para>index.php in the top directory is the only way in of the application, you should rewrite all request to it. (You can use .htaccess in Apache + php_mod) </para>
...
...
@@ -45,9 +42,7 @@ $app->bootstrap() //call bootstrap methods defined in Bootstrap.php
45
42
]]>
46
43
</programlisting>
47
44
</example>
48
-
</section>
49
45

50
-
<section role="examples">
51
46
<example>
52
47
<title>Rewrite rule</title>
53
48
<screen>
...
...
@@ -65,7 +60,7 @@ server {
65
60
index index.php index.html index.htm;
66
61

67
62
if (!-e $request_filename) {
68
-
rewrite ^/(.*) /index.php/$1 last;
63
+
rewrite ^/(.*) /index.php$1 last;
69
64
}
70
65
}
71
66

...
...
@@ -78,9 +73,7 @@ $HTTP["host"] =~ "(www.)?domain.com$" {
78
73
]]>
79
74
</screen>
80
75
</example>
81
-
</section>
82
76

83
-
<section role="examples">
84
77
<example>
85
78
<title>Application config</title>
86
79
<programlisting role="ini">
...
...
@@ -95,9 +88,7 @@ foo=bar
95
88
]]>
96
89
</programlisting>
97
90
</example>
98
-
</section>
99
91

100
-
<section role="examples">
101
92
<example>
102
93
<title>Default controller</title>
103
94
<programlisting role="php">
...
...
@@ -115,9 +106,7 @@ class IndexController extends Yaf_Controller_Abstract {
115
106
]]>
116
107
</programlisting>
117
108
</example>
118
-
</section>
119
109

120
-
<section role="examples">
121
110
<example>
122
111
<title>Default view template</title>
123
112
<programlisting role="php">
...
...
@@ -132,14 +121,12 @@ class IndexController extends Yaf_Controller_Abstract {
132
121
</html>
133
122
]]>
134
123
</programlisting>
135
-
</example>
136
-
</section>
124
+
</example>
137
125

138
-
<section role="examples">
139
-
<example>
140
-
<title>Run the Application</title>
141
-
&example.outputs.similar;
142
-
<screen>
126
+
<example>
127
+
<title>Run the Application</title>
128
+
&example.outputs.similar;
129
+
<screen>
143
130
<![CDATA[
144
131
<html>
145
132
<head>
...
...
@@ -150,18 +137,16 @@ class IndexController extends Yaf_Controller_Abstract {
150
137
</body>
151
138
</html>
152
139
]]>
153
-
</screen>
154
-
<note>
155
-
<para>
156
-
you can also generate above example by use Yaf codes generator, which
157
-
could be found here yaf@github.
158
-
</para>
159
-
</note>
160
-
</example>
161
-
</section>
140
+
</screen>
141
+
<note>
142
+
<para>
143
+
you can also generate above example by use Yaf codes generator, which
144
+
could be found here yaf@github.
145
+
</para>
146
+
</note>
147
+
</example>
162
148

163
149
</chapter>
164
-

165
150
<!-- Keep this comment at the end of the file
166
151
Local variables:
167
152
mode: sgml
168
153