Skip to content

Commit 4d72f13

Browse files
thinkverseGirgias
authored andcommitted
Fix missing sections/section order for Win32Services extension
Closes GH-577
1 parent f47136f commit 4d72f13

4 files changed

Lines changed: 122 additions & 116 deletions

File tree

reference/win32service/functions/win32-create-service.xml

Lines changed: 53 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
<refname>win32_create_service</refname>
77
<refpurpose>Creates a new service entry in the SCM database</refpurpose>
88
</refnamediv>
9+
910
<refsect1 role="description">
1011
&reftitle.description;
1112
<methodsynopsis>
@@ -18,6 +19,7 @@
1819
privileges are required for this to succeed.
1920
</para>
2021
</refsect1>
22+
2123
<refsect1 role="parameters">
2224
&reftitle.parameters;
2325
<para>
@@ -300,7 +302,7 @@
300302
</para>
301303
</refsect1>
302304

303-
<refsect1 role="errors"><!-- {{{ -->
305+
<refsect1 role="errors">
304306
&reftitle.errors;
305307
<para>
306308
A <classname>ValueError</classname> is thrown if the;
@@ -351,9 +353,57 @@
351353
<para>
352354
A <classname>Win32ServiceException</classname> is thrown on error.
353355
</para>
354-
</refsect1><!-- }}} -->
355-
356+
</refsect1>
356357

358+
<refsect1 role="changelog">
359+
&reftitle.changelog;
360+
<para>
361+
<informaltable>
362+
<tgroup cols="2">
363+
<thead>
364+
<row>
365+
<entry>&Version;</entry>
366+
<entry>&Description;</entry>
367+
</row>
368+
</thead>
369+
<tbody>
370+
<row>
371+
<entry>PECL win32service 1.0.0</entry>
372+
<entry>
373+
Throws a <classname>ValueError</classname> on invalid data in parameters,
374+
previously &false; was returned.
375+
</entry>
376+
</row>
377+
<row>
378+
<entry>PECL win32service 1.0.0</entry>
379+
<entry>
380+
Throws a <classname>Win32ServiceException</classname> on error,
381+
previously a
382+
<link xmlns="http://docbook.org/ns/docbook" linkend="win32service.constants.errors">Win32 Error Code</link>
383+
was returned.
384+
</entry>
385+
</row>
386+
<row>
387+
<entry>PECL win32service 1.0.0</entry>
388+
<entry>
389+
The return type is now <type>void</type>, previously it was <type>mixed</type>.
390+
</entry>
391+
</row>
392+
<row>
393+
<entry>PECL win32service 0.4.0</entry>
394+
<entry>
395+
The <parameter>dependencies</parameter>, <parameter>recovery_delay</parameter>,
396+
<parameter>recovery_action_1</parameter>, <parameter>recovery_action_2</parameter>,
397+
<parameter>recovery_action_3</parameter>, <parameter>recovery_reset_period</parameter>,
398+
<parameter>recovery_enabled</parameter>, <parameter>recovery_reboot_msg</parameter>
399+
and <parameter>recovery_command</parameter> parameters have been added.
400+
</entry>
401+
</row>
402+
</tbody>
403+
</tgroup>
404+
</informaltable>
405+
</para>
406+
</refsect1>
357407

358408
<refsect1 role="examples">
359409
&reftitle.examples;
@@ -431,57 +481,6 @@ debug_zval_dump($x);
431481
</para>
432482
</refsect1>
433483

434-
435-
<refsect1 role="changelog"><!-- {{{ -->
436-
&reftitle.changelog;
437-
<para>
438-
<informaltable>
439-
<tgroup cols="2">
440-
<thead>
441-
<row>
442-
<entry>&Version;</entry>
443-
<entry>&Description;</entry>
444-
</row>
445-
</thead>
446-
<tbody>
447-
<row>
448-
<entry>PECL win32service 1.0.0</entry>
449-
<entry>
450-
Throws a <classname>ValueError</classname> on invalid data in parameters,
451-
previously &false; was returned.
452-
</entry>
453-
</row>
454-
<row>
455-
<entry>PECL win32service 1.0.0</entry>
456-
<entry>
457-
Throws a <classname>Win32ServiceException</classname> on error,
458-
previously a
459-
<link xmlns="http://docbook.org/ns/docbook" linkend="win32service.constants.errors">Win32 Error Code</link>
460-
was returned.
461-
</entry>
462-
</row>
463-
<row>
464-
<entry>PECL win32service 1.0.0</entry>
465-
<entry>
466-
The return type is now <type>void</type>, previously it was <type>mixed</type>.
467-
</entry>
468-
</row>
469-
<row>
470-
<entry>PECL win32service 0.4.0</entry>
471-
<entry>
472-
The <parameter>dependencies</parameter>, <parameter>recovery_delay</parameter>,
473-
<parameter>recovery_action_1</parameter>, <parameter>recovery_action_2</parameter>,
474-
<parameter>recovery_action_3</parameter>, <parameter>recovery_reset_period</parameter>,
475-
<parameter>recovery_enabled</parameter>, <parameter>recovery_reboot_msg</parameter>
476-
and <parameter>recovery_command</parameter> parameters have been added.
477-
</entry>
478-
</row>
479-
</tbody>
480-
</tgroup>
481-
</informaltable>
482-
</para>
483-
</refsect1><!-- }}} -->
484-
485484
<refsect1 role="seealso">
486485
&reftitle.seealso;
487486
<para>

reference/win32service/functions/win32-delete-service.xml

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
</para>
2828

2929
</refsect1>
30+
3031
<refsect1 role="parameters">
3132
&reftitle.parameters;
3233
<para>
@@ -61,8 +62,7 @@
6162
</para>
6263
</refsect1>
6364

64-
65-
<refsect1 role="errors"><!-- {{{ -->
65+
<refsect1 role="errors">
6666
&reftitle.errors;
6767
<para>
6868
A <classname>ValueError</classname> is thrown if the;
@@ -72,28 +72,9 @@
7272
<para>
7373
A <classname>Win32ServiceException</classname> is thrown on error.
7474
</para>
75-
</refsect1><!-- }}} -->
76-
77-
<refsect1 role="examples">
78-
&reftitle.examples;
79-
<para>
80-
<example>
81-
<title>A <function>win32_delete_service</function> example</title>
82-
<para>
83-
Deletes the dummyphp service.
84-
</para>
85-
<programlisting role="php">
86-
<![CDATA[
87-
<?php
88-
win32_delete_service('dummyphp');
89-
?>
90-
]]>
91-
</programlisting>
92-
</example>
93-
</para>
9475
</refsect1>
9576

96-
<refsect1 role="changelog"><!-- {{{ -->
77+
<refsect1 role="changelog">
9778
&reftitle.changelog;
9879
<para>
9980
<informaltable>
@@ -131,7 +112,26 @@ win32_delete_service('dummyphp');
131112
</tgroup>
132113
</informaltable>
133114
</para>
134-
</refsect1><!-- }}} -->
115+
</refsect1>
116+
117+
<refsect1 role="examples">
118+
&reftitle.examples;
119+
<para>
120+
<example>
121+
<title>A <function>win32_delete_service</function> example</title>
122+
<para>
123+
Deletes the dummyphp service.
124+
</para>
125+
<programlisting role="php">
126+
<![CDATA[
127+
<?php
128+
win32_delete_service('dummyphp');
129+
?>
130+
]]>
131+
</programlisting>
132+
</example>
133+
</para>
134+
</refsect1>
135135

136136
<refsect1 role="seealso">
137137
&reftitle.seealso;

reference/win32service/functions/win32-get-last-control-message.xml

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,12 @@
2626
</caution>
2727

2828
</refsect1>
29+
30+
<refsect1 role="parameters">
31+
&reftitle.parameters;
32+
&no.function.parameters;
33+
</refsect1>
34+
2935
<refsect1 role="returnvalues">
3036
&reftitle.returnvalues;
3137
<para>
@@ -52,7 +58,7 @@
5258
</para>
5359
</refsect1>
5460

55-
<refsect1 role="errors"><!-- {{{ -->
61+
<refsect1 role="errors">
5662
&reftitle.errors;
5763
<para>
5864
Prior to version 1.0.0, if the SAPI is not <literal>"cli"</literal>, this function emits an
@@ -63,9 +69,9 @@
6369
<classname>Win32ServiceException</classname> if SAPI is not
6470
<literal>"cli"</literal>
6571
</para>
66-
</refsect1><!-- }}} -->
72+
</refsect1>
6773

68-
<refsect1 role="changelog"><!-- {{{ -->
74+
<refsect1 role="changelog">
6975
&reftitle.changelog;
7076
<para>
7177
<informaltable>
@@ -103,7 +109,7 @@
103109
</tgroup>
104110
</informaltable>
105111
</para>
106-
</refsect1><!-- }}} -->
112+
</refsect1>
107113

108114
<refsect1 role="seealso">
109115
&reftitle.seealso;

reference/win32service/functions/win32-start-service-ctrl-dispatcher.xml

Lines changed: 36 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@
4141
</para>
4242
</caution>
4343
</refsect1>
44+
4445
<refsect1 role="parameters">
4546
&reftitle.parameters;
4647
<para>
@@ -77,7 +78,7 @@
7778
</para>
7879
</refsect1>
7980

80-
<refsect1 role="errors"><!-- {{{ -->
81+
<refsect1 role="errors">
8182
&reftitle.errors;
8283
<para>
8384
Prior to version 1.0.0, if the SAPI is not <literal>"cli"</literal>, this function emits an
@@ -88,41 +89,9 @@
8889
<classname>Win32ServiceException</classname> if SAPI is not
8990
<literal>"cli"</literal>
9091
</para>
91-
</refsect1><!-- }}} -->
92-
93-
<refsect1 role="examples">
94-
&reftitle.examples;
95-
<para>
96-
<example>
97-
<title>A <function>win32_start_service_ctrl_dispatcher</function> example</title>
98-
<para>
99-
Check if the service is runnig under the SCM.
100-
</para>
101-
<programlisting role="php">
102-
<![CDATA[
103-
<?php
104-
if (!win32_start_service_ctrl_dispatcher('dummyphp')) {
105-
die("I'm probably not running under the service control manager");
106-
}
107-
108-
win32_set_service_status(WIN32_SERVICE_START_PENDING);
109-
110-
// Some lengthy process to get this service up and running.
111-
112-
win32_set_service_status(WIN32_SERVICE_RUNNING);
113-
114-
while (WIN32_SERVICE_CONTROL_STOP != win32_get_last_control_message()) {
115-
# do some work here, trying not to take more than around 30 seconds
116-
# before coming back into the loop again
117-
}
118-
?>
119-
]]>
120-
</programlisting>
121-
</example>
122-
</para>
12392
</refsect1>
12493

125-
<refsect1 role="changelog"><!-- {{{ -->
94+
<refsect1 role="changelog">
12695
&reftitle.changelog;
12796
<para>
12897
<informaltable>
@@ -172,7 +141,39 @@ while (WIN32_SERVICE_CONTROL_STOP != win32_get_last_control_message()) {
172141
</tgroup>
173142
</informaltable>
174143
</para>
175-
</refsect1><!-- }}} -->
144+
</refsect1>
145+
146+
<refsect1 role="examples">
147+
&reftitle.examples;
148+
<para>
149+
<example>
150+
<title>A <function>win32_start_service_ctrl_dispatcher</function> example</title>
151+
<para>
152+
Check if the service is runnig under the SCM.
153+
</para>
154+
<programlisting role="php">
155+
<![CDATA[
156+
<?php
157+
if (!win32_start_service_ctrl_dispatcher('dummyphp')) {
158+
die("I'm probably not running under the service control manager");
159+
}
160+
161+
win32_set_service_status(WIN32_SERVICE_START_PENDING);
162+
163+
// Some lengthy process to get this service up and running.
164+
165+
win32_set_service_status(WIN32_SERVICE_RUNNING);
166+
167+
while (WIN32_SERVICE_CONTROL_STOP != win32_get_last_control_message()) {
168+
# do some work here, trying not to take more than around 30 seconds
169+
# before coming back into the loop again
170+
}
171+
?>
172+
]]>
173+
</programlisting>
174+
</example>
175+
</para>
176+
</refsect1>
176177

177178
<refsect1 role="seealso">
178179
&reftitle.seealso;

0 commit comments

Comments
 (0)