Skip to content

Commit c9389e4

Browse files
authored
Clean up reference/yaf documentation
* Fix returnvalues section on yaf_route_* docs * Fix return values section being out-of-order * Fix appendBody docs having duplicate seealso sections * Fix return values to use string entity * Fix errors section missing literal tag and typo * Remove Yaf_Simple_View::__construct return values section * Fix Yaf_Controller_Abstract::forward return values * Fix Yaf_Controller_Abstract::forward signature * Add errors section * Update Yaf_Route_Simple::assemble * Fix Yaf_Route_Rewrite::assemble return value * Update Yaf_Route_Regex::assemble * Update Yaf_Route_Map::assemble Closes GH-569.
1 parent 593ea51 commit c9389e4

File tree

9 files changed

+96
-70
lines changed

9 files changed

+96
-70
lines changed

reference/yaf/yaf_controller_abstract/forward.xml

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -10,18 +10,18 @@
1010
<refsect1 role="description">
1111
&reftitle.description;
1212
<methodsynopsis>
13-
<modifier>public</modifier> <type>void</type><methodname>Yaf_Controller_Abstract::forward</methodname>
13+
<modifier>public</modifier> <type>bool</type><methodname>Yaf_Controller_Abstract::forward</methodname>
1414
<methodparam><type>string</type><parameter>action</parameter></methodparam>
1515
<methodparam choice="opt"><type>array</type><parameter>paramters</parameter></methodparam>
1616
</methodsynopsis>
1717
<methodsynopsis>
18-
<modifier>public</modifier> <type>void</type><methodname>Yaf_Controller_Abstract::forward</methodname>
18+
<modifier>public</modifier> <type>bool</type><methodname>Yaf_Controller_Abstract::forward</methodname>
1919
<methodparam><type>string</type><parameter>controller</parameter></methodparam>
2020
<methodparam><type>string</type><parameter>action</parameter></methodparam>
2121
<methodparam choice="opt"><type>array</type><parameter>paramters</parameter></methodparam>
2222
</methodsynopsis>
2323
<methodsynopsis>
24-
<modifier>public</modifier> <type>void</type><methodname>Yaf_Controller_Abstract::forward</methodname>
24+
<modifier>public</modifier> <type>bool</type><methodname>Yaf_Controller_Abstract::forward</methodname>
2525
<methodparam><type>string</type><parameter>module</parameter></methodparam>
2626
<methodparam><type>string</type><parameter>controller</parameter></methodparam>
2727
<methodparam><type>string</type><parameter>action</parameter></methodparam>
@@ -77,6 +77,13 @@
7777
</variablelist>
7878
</refsect1>
7979

80+
<refsect1 role="returnvalues">
81+
&reftitle.returnvalues;
82+
<para>
83+
&return.success;
84+
</para>
85+
</refsect1>
86+
8087
<refsect1 role="examples">
8188
&reftitle.examples;
8289
<example>
@@ -113,14 +120,6 @@ class IndexController extends Yaf_Controller_Abstract
113120
</example>
114121
</refsect1>
115122

116-
117-
<refsect1 role="returnvalues">
118-
&reftitle.returnvalues;
119-
<para>
120-
return FALSE on failure
121-
</para>
122-
</refsect1>
123-
124123
<refsect1 role="seealso">
125124
&reftitle.seealso;
126125
<simplelist>

reference/yaf/yaf_response_abstract/appendbody.xml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,20 +82,13 @@ Hello World
8282
&reftitle.seealso;
8383
<simplelist>
8484
<member><classname>Yaf_Config_Ini</classname></member>
85-
</simplelist>
86-
</refsect1>
87-
88-
<refsect1 role="seealso">
89-
&reftitle.seealso;
90-
<simplelist>
9185
<member><methodname>Yaf_Response_Abstract::getBody</methodname></member>
9286
<member><methodname>Yaf_Response_Abstract::setBody</methodname></member>
9387
<member><methodname>Yaf_Response_Abstract::prependBody</methodname></member>
9488
<member><methodname>Yaf_Response_Abstract::clearBody</methodname></member>
9589
</simplelist>
9690
</refsect1>
9791

98-
9992
</refentry>
10093

10194
<!-- Keep this comment at the end of the file

reference/yaf/yaf_route_map/assemble.xml

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,20 @@
4141
</variablelist>
4242
</refsect1>
4343

44+
<refsect1 role="returnvalues">
45+
&reftitle.returnvalues;
46+
<para>
47+
Returns &string; on success or &null; on failure.
48+
</para>
49+
</refsect1>
50+
51+
<refsect1 role="errors">
52+
&reftitle.errors;
53+
<para>
54+
May throw <classname>Yaf_Exception_TypeError</classname>.
55+
</para>
56+
</refsect1>
57+
4458
<refsect1 role="examples">
4559
&reftitle.examples;
4660
<example>
@@ -91,13 +105,6 @@ string(%d) "/foo/bar/_/tkey1/tval1/tkey2/tval2"
91105
</example>
92106
</refsect1>
93107

94-
<refsect1 role="returnvalues">
95-
&reftitle.returnvalues;
96-
<para>
97-
98-
</para>
99-
</refsect1>
100-
101108
</refentry>
102109

103110
<!-- Keep this comment at the end of the file

reference/yaf/yaf_route_regex/assemble.xml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
<refsect1 role="description">
1111
&reftitle.description;
1212
<methodsynopsis>
13-
<modifier>public</modifier> <type>string</type><methodname>Yaf_Route_Regex::assemble</methodname>
13+
<modifier>public</modifier> <type class="union"><type>string</type><type>null</type></type><methodname>Yaf_Route_Regex::assemble</methodname>
1414
<methodparam><type>array</type><parameter>info</parameter></methodparam>
1515
<methodparam choice="opt"><type>array</type><parameter>query</parameter></methodparam>
1616
</methodsynopsis>
@@ -41,6 +41,13 @@
4141
</variablelist>
4242
</refsect1>
4343

44+
<refsect1 role="returnvalues">
45+
&reftitle.returnvalues;
46+
<para>
47+
Returns &string; on success or &null; on failure.
48+
</para>
49+
</refsect1>
50+
4451
<refsect1 role="examples">
4552
&reftitle.examples;
4653
<example>
@@ -87,13 +94,6 @@ string(49) "/module/controller/action?tkey1=tval1&tkey2=tval2"
8794
</example>
8895
</refsect1>
8996

90-
<refsect1 role="returnvalues">
91-
&reftitle.returnvalues;
92-
<para>
93-
94-
</para>
95-
</refsect1>
96-
9797
</refentry>
9898

9999
<!-- Keep this comment at the end of the file

reference/yaf/yaf_route_rewrite/assemble.xml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,13 @@
4141
</variablelist>
4242
</refsect1>
4343

44+
<refsect1 role="returnvalues">
45+
&reftitle.returnvalues;
46+
<para>
47+
Returns &string;.
48+
</para>
49+
</refsect1>
50+
4451
<refsect1 role="examples">
4552
&reftitle.examples;
4653
<example>
@@ -83,13 +90,6 @@ string(57) "/product/foo/bar/tmpkey1/tmpval1/?tkey1=tval1&tkey2=tval2"
8390
</example>
8491
</refsect1>
8592

86-
<refsect1 role="returnvalues">
87-
&reftitle.returnvalues;
88-
<para>
89-
90-
</para>
91-
</refsect1>
92-
9393
</refentry>
9494

9595
<!-- Keep this comment at the end of the file

reference/yaf/yaf_route_simple/assemble.xml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,21 @@
4141
</variablelist>
4242
</refsect1>
4343

44+
<refsect1 role="returnvalues">
45+
&reftitle.returnvalues;
46+
<para>
47+
Returns a &string;.
48+
</para>
49+
</refsect1>
50+
51+
<refsect1 role="errors">
52+
&reftitle.errors;
53+
<para>
54+
Throws <classname>Yaf_Exception_TypeError</classname> if <parameter>info</parameter>
55+
keys <literal>':c'</literal> or <literal>':a'</literal> are not set.
56+
</para>
57+
</refsect1>
58+
4459
<refsect1 role="examples">
4560
&reftitle.examples;
4661
<example>
@@ -78,13 +93,6 @@ string(64) "?m=yafmodule&c=yafcontroller&a=yafaction&tkey1=tval1&tkey2=tval2"
7893
</example>
7994
</refsect1>
8095

81-
<refsect1 role="returnvalues">
82-
&reftitle.returnvalues;
83-
<para>
84-
85-
</para>
86-
</refsect1>
87-
8896
</refentry>
8997

9098
<!-- Keep this comment at the end of the file

reference/yaf/yaf_route_static/assemble.xml

Lines changed: 15 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,21 @@
4141
</variablelist>
4242
</refsect1>
4343

44+
<refsect1 role="returnvalues">
45+
&reftitle.returnvalues;
46+
<para>
47+
Returns a &string;.
48+
</para>
49+
</refsect1>
50+
51+
<refsect1 role="errors">
52+
&reftitle.errors;
53+
<para>
54+
Throws <classname>Yaf_Exception_TypeError</classname> if <parameter>info</parameter>
55+
keys <literal>':c'</literal> and <literal>':a'</literal> are not set.
56+
</para>
57+
</refsect1>
58+
4459
<refsect1 role="examples">
4560
&reftitle.examples;
4661
<example>
@@ -91,13 +106,6 @@ string(%d) "/yafmodule/yafcontroller/yafaction?tkey1=tval1&tkey2=tval2"
91106
</example>
92107
</refsect1>
93108

94-
<refsect1 role="returnvalues">
95-
&reftitle.returnvalues;
96-
<para>
97-
98-
</para>
99-
</refsect1>
100-
101109
</refentry>
102110

103111
<!-- Keep this comment at the end of the file

reference/yaf/yaf_route_supervar/assemble.xml

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,25 @@
4141
</variablelist>
4242
</refsect1>
4343

44+
<refsect1 role="returnvalues">
45+
&reftitle.returnvalues;
46+
<para>
47+
Returns a &string;.
48+
</para>
49+
</refsect1>
50+
51+
<refsect1 role="errors">
52+
&reftitle.errors;
53+
<para>
54+
Throws <classname>Yaf_Exception_TypeError</classname> if <parameter>info</parameter>
55+
keys <literal>':c'</literal> and <literal>':a'</literal> are not set.
56+
</para>
57+
</refsect1>
58+
4459
<refsect1 role="examples">
4560
&reftitle.examples;
4661
<example>
47-
<title><function>Yaf_Route_Supervar::assemble</function>example</title>
62+
<title><function>Yaf_Route_Supervar::assemble</function> example</title>
4863
<programlisting role="php">
4964
<![CDATA[
5065
<?php
@@ -96,13 +111,6 @@ string(%d) "You need to specify the controller by ':c'"
96111
</example>
97112
</refsect1>
98113

99-
<refsect1 role="returnvalues">
100-
&reftitle.returnvalues;
101-
<para>
102-
103-
</para>
104-
</refsect1>
105-
106114
</refentry>
107115

108116
<!-- Keep this comment at the end of the file

reference/yaf/yaf_view_simple/construct.xml

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,17 @@
4747
</variablelist>
4848
</refsect1>
4949

50+
<!-- Return values commented out, as constructors generally don't return a
51+
value. Uncomment this if you do need a return values section (for
52+
example, because there's also a procedural version of the method).
53+
<refsect1 role="returnvalues">
54+
&reftitle.returnvalues;
55+
<para>
56+
57+
</para>
58+
</refsect1>
59+
-->
60+
5061
<refsect1 role="examples">
5162
&reftitle.examples;
5263
<example>
@@ -64,14 +75,6 @@
6475
</example>
6576
</refsect1>
6677

67-
<refsect1 role="returnvalues">
68-
&reftitle.returnvalues;
69-
<para>
70-
71-
</para>
72-
</refsect1>
73-
74-
7578
</refentry>
7679

7780
<!-- Keep this comment at the end of the file

0 commit comments

Comments
 (0)