language/predefined/generator/send.xml
8fee3ae9715ffa15922469eb7d98f4878917a6ee
...
...
@@ -1,6 +1,5 @@
1
1
<?xml version="1.0" encoding="utf-8"?>
2
2
<!-- $Revision$ -->
3
-

4
3
<refentry xml:id="generator.send" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
5
4
<refnamediv>
6
5
<refname>Generator::send</refname>
...
...
@@ -9,7 +8,7 @@
9
8

10
9
<refsect1 role="description">
11
10
&reftitle.description;
12
-
<methodsynopsis>
11
+
<methodsynopsis role="Generator">
13
12
<modifier>public</modifier> <type>mixed</type><methodname>Generator::send</methodname>
14
13
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
15
14
</methodsynopsis>
...
...
@@ -56,9 +55,10 @@
56
55
<![CDATA[
57
56
<?php
58
57
function printer() {
58
+
echo "I'm printer!".PHP_EOL;
59
59
while (true) {
60
60
$string = yield;
61
-
echo $string;
61
+
echo $string.PHP_EOL;
62
62
}
63
63
}
64
64

...
...
@@ -71,6 +71,7 @@ $printer->send('Bye world!');
71
71
&example.outputs;
72
72
<screen>
73
73
<![CDATA[
74
+
I'm printer!
74
75
Hello world!
75
76
Bye world!
76
77
]]>
...
...
@@ -79,7 +80,6 @@ Bye world!
79
80
</para>
80
81
</refsect1>
81
82
</refentry>
82
-

83
83
<!-- Keep this comment at the end of the file
84
84
Local variables:
85
85
mode: sgml
86
86