reference/pgsql/functions/pg-get-notify.xml
cfeb14a38b666f6a3fc73da70f4a90fbe115e53f
...
...
@@ -9,9 +9,9 @@
9
9
<refsect1 role="description">
10
10
&reftitle.description;
11
11
<methodsynopsis>
12
-
<type>array</type><methodname>pg_get_notify</methodname>
13
-
<methodparam><type>resource</type><parameter>connection</parameter></methodparam>
14
-
<methodparam choice="opt"><type>int</type><parameter>result_type</parameter></methodparam>
12
+
<type class="union"><type>array</type><type>false</type></type><methodname>pg_get_notify</methodname>
13
+
<methodparam><type>PgSql\Connection</type><parameter>connection</parameter></methodparam>
14
+
<methodparam choice="opt"><type>int</type><parameter>mode</parameter><initializer><constant>PGSQL_ASSOC</constant></initializer></methodparam>
15
15
</methodsynopsis>
16
16
<para>
17
17
<function>pg_get_notify</function> gets notifications generated by a
...
...
@@ -28,26 +28,13 @@
28
28
<varlistentry>
29
29
<term><parameter>connection</parameter></term>
30
30
<listitem>
31
-
<para>
32
-
PostgreSQL database connection resource.
33
-
</para>
31
+
&pgsql.parameter.connection;
34
32
</listitem>
35
33
</varlistentry>
36
34
<varlistentry>
37
-
<term><parameter>result_type</parameter></term>
35
+
<term><parameter>mode</parameter></term>
38
36
<listitem>
39
-
<para>
40
-
An optional parameter that controls
41
-
how the returned <type>array</type> is indexed.
42
-
<parameter>result_type</parameter> is a constant and can take the
43
-
following values: <constant>PGSQL_ASSOC</constant>,
44
-
<constant>PGSQL_NUM</constant> and <constant>PGSQL_BOTH</constant>.
45
-
Using <constant>PGSQL_NUM</constant>, <function>pg_get_notify</function>
46
-
will return an array with numerical indices, using
47
-
<constant>PGSQL_ASSOC</constant> it will return only associative indices
48
-
while <constant>PGSQL_BOTH</constant>, the default, will return both
49
-
numerical and associative indices.
50
-
</para>
37
+
&pgsql.parameter.mode;
51
38
</listitem>
52
39
</varlistentry>
53
40
</variablelist>
...
...
@@ -58,11 +45,28 @@
58
45
&reftitle.returnvalues;
59
46
<para>
60
47
An <type>array</type> containing the <literal>NOTIFY</literal> message name and backend PID.
61
-
As of PHP 5.4.0 and if supported by the server, the array also contains the server version and the payload.
48
+
If supported by the server, the array also contains the server version and the payload.
62
49
Otherwise if no <literal>NOTIFY</literal> is waiting, then &false; is returned.
63
50
</para>
64
51
</refsect1>
65
52

53
+
<refsect1 role="changelog">
54
+
&reftitle.changelog;
55
+
<informaltable>
56
+
<tgroup cols="2">
57
+
<thead>
58
+
<row>
59
+
<entry>&Version;</entry>
60
+
<entry>&Description;</entry>
61
+
</row>
62
+
</thead>
63
+
<tbody>
64
+
&pgsql.changelog.connection-object;
65
+
</tbody>
66
+
</tgroup>
67
+
</informaltable>
68
+
</refsect1>
69
+

66
70
<refsect1 role="examples">
67
71
&reftitle.examples;
68
72
<para>
...
...
@@ -101,7 +105,6 @@ if (!$notify) {
101
105
</para>
102
106
</refsect1>
103
107
</refentry>
104
-

105
108
<!-- Keep this comment at the end of the file
106
109
Local variables:
107
110
mode: sgml
108
111