Skip to content

Commit 4097422

Browse files
committed
Generate ext/pdo methodsynopses based on stubs (php/doc-en#494)
1 parent 3e346a9 commit 4097422

23 files changed

+146
-139
lines changed

reference/pdo/constants.xml

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: a0ae28d3bc85f927c22649ebd9a590b921534b7d Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: c9c158137b0f4658c29faef4043472dc74896d0c Maintainer: takagi Status: ready -->
44
<!-- CREDITS: hirokawa,shimooka,mumumu -->
55
<appendix xml:id="pdo.constants" xmlns="http://docbook.org/ns/docbook">
66
&reftitle.constants;
@@ -112,6 +112,17 @@
112112
</simpara>
113113
</listitem>
114114
</varlistentry>
115+
<varlistentry xml:id="pdo.constants.fetch-default">
116+
<term>
117+
<constant>PDO::FETCH_DEFAULT</constant>
118+
(<type>int</type>)
119+
</term>
120+
<listitem>
121+
<simpara>
122+
デフォルトの取得方法を使うことを指定します。
123+
</simpara>
124+
</listitem>
125+
</varlistentry>
115126
<varlistentry xml:id="pdo.constants.fetch-lazy">
116127
<term>
117128
<constant>PDO::FETCH_LAZY</constant>

reference/pdo/pdo/construct.xml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: a3a310ccc23af2710c307fb4c6535b123ae2223c Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: c9c158137b0f4658c29faef4043472dc74896d0c Maintainer: takagi Status: ready -->
44
<!-- CREDITS: hirokawa,shimooka,mumumu -->
55
<refentry xml:id="pdo.construct" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -14,9 +14,9 @@
1414
<constructorsynopsis>
1515
<modifier>public</modifier> <methodname>PDO::__construct</methodname>
1616
<methodparam><type>string</type><parameter>dsn</parameter></methodparam>
17-
<methodparam choice="opt"><type>string</type><parameter>username</parameter></methodparam>
18-
<methodparam choice="opt"><type>string</type><parameter>passwd</parameter></methodparam>
19-
<methodparam choice="opt"><type>array</type><parameter>options</parameter></methodparam>
17+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>username</parameter><initializer>&null;</initializer></methodparam>
18+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>password</parameter><initializer>&null;</initializer></methodparam>
19+
<methodparam choice="opt"><type class="union"><type>array</type><type>null</type></type><parameter>options</parameter><initializer>&null;</initializer></methodparam>
2020
</constructorsynopsis>
2121
<para>
2222
指定されたデータベースへの接続を表す PDO インスタンスを生成します。
@@ -198,7 +198,6 @@ $dbh = new PDO($dsn, $user, $password);
198198
</refsect1>
199199

200200
</refentry>
201-
202201
<!-- Keep this comment at the end of the file
203202
Local variables:
204203
mode: sgml

reference/pdo/pdo/errorcode.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 4754397753fd79f1c846868b66a2448babab1c54 Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: c9c158137b0f4658c29faef4043472dc74896d0c Maintainer: takagi Status: ready -->
44
<!-- CREDITS: shimooka,mumumu -->
55
<refentry xml:id="pdo.errorcode" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -12,7 +12,7 @@
1212
<refsect1 role="description">
1313
&reftitle.description;
1414
<methodsynopsis>
15-
<modifier>public</modifier> <type>string</type><methodname>PDO::errorCode</methodname>
15+
<modifier>public</modifier> <type class="union"><type>string</type><type>null</type></type><methodname>PDO::errorCode</methodname>
1616
<void/>
1717
</methodsynopsis>
1818

@@ -83,7 +83,6 @@ PDO::errorCode(): 42S02
8383
</refsect1>
8484

8585
</refentry>
86-
8786
<!-- Keep this comment at the end of the file
8887
Local variables:
8988
mode: sgml

reference/pdo/pdo/exec.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 169d4be91bd71c2e0490701966e2a458bec8ec77 Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: c9c158137b0f4658c29faef4043472dc74896d0c Maintainer: takagi Status: ready -->
44
<!-- CREDITS: shimooka,mumumu -->
55
<refentry xml:id="pdo.exec" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -12,7 +12,7 @@
1212
<refsect1 role="description">
1313
&reftitle.description;
1414
<methodsynopsis>
15-
<modifier>public</modifier> <type>int</type><methodname>PDO::exec</methodname>
15+
<modifier>public</modifier> <type class="union"><type>int</type><type>false</type></type><methodname>PDO::exec</methodname>
1616
<methodparam><type>string</type><parameter>statement</parameter></methodparam>
1717
</methodsynopsis>
1818

@@ -121,7 +121,6 @@ Deleted 1 rows.
121121

122122

123123
</refentry>
124-
125124
<!-- Keep this comment at the end of the file
126125
Local variables:
127126
mode: sgml

reference/pdo/pdo/getattribute.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 656d1610af1a960d87c8b7056e54d0d4c75fb123 Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: c9c158137b0f4658c29faef4043472dc74896d0c Maintainer: takagi Status: ready -->
44
<!-- CREDITS: shimooka -->
55
<refentry xml:id="pdo.getattribute" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -12,7 +12,7 @@
1212
<refsect1 role="description">
1313
&reftitle.description;
1414
<methodsynopsis>
15-
<modifier>public</modifier> <type>mixed</type><methodname>PDO::getAttribute</methodname>
15+
<modifier>public</modifier> <type class="union"><type>bool</type><type>int</type><type>string</type><type>array</type><type>null</type></type><methodname>PDO::getAttribute</methodname>
1616
<methodparam><type>int</type><parameter>attribute</parameter></methodparam>
1717
</methodsynopsis>
1818

@@ -116,7 +116,6 @@ Use the PEAR Coding Standards
116116

117117

118118
</refentry>
119-
120119
<!-- Keep this comment at the end of the file
121120
Local variables:
122121
mode: sgml

reference/pdo/pdo/lastinsertid.xml

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 14af302c9c0e561fa6f9cdd956268758ba9a89c5 Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: c9c158137b0f4658c29faef4043472dc74896d0c Maintainer: takagi Status: ready -->
44
<!-- CREDITS: shimooka -->
55
<refentry xml:id="pdo.lastinsertid" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -12,8 +12,8 @@
1212
<refsect1 role="description">
1313
&reftitle.description;
1414
<methodsynopsis>
15-
<modifier>public</modifier> <type>string</type><methodname>PDO::lastInsertId</methodname>
16-
<methodparam choice="opt"><type>string</type><parameter>name</parameter><initializer>&null;</initializer></methodparam>
15+
<modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>PDO::lastInsertId</methodname>
16+
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>name</parameter><initializer>&null;</initializer></methodparam>
1717
</methodsynopsis>
1818

1919
<para>
@@ -72,7 +72,6 @@
7272
</refsect1>
7373

7474
</refentry>
75-
7675
<!-- Keep this comment at the end of the file
7776
Local variables:
7877
mode: sgml

reference/pdo/pdo/prepare.xml

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: 8a058e9acded067eaa1bd445ed6943158e7311df Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: c9c158137b0f4658c29faef4043472dc74896d0c Maintainer: takagi Status: ready -->
44
<!-- CREDITS: shimooka,mumumu -->
55
<refentry xml:id="pdo.prepare" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -12,9 +12,9 @@
1212
<refsect1 role="description">
1313
&reftitle.description;
1414
<methodsynopsis>
15-
<modifier>public</modifier> <type>PDOStatement</type><methodname>PDO::prepare</methodname>
16-
<methodparam><type>string</type><parameter>statement</parameter></methodparam>
17-
<methodparam choice="opt"><type>array</type><parameter>driver_options</parameter><initializer>array()</initializer></methodparam>
15+
<modifier>public</modifier> <type class="union"><type>PDOStatement</type><type>false</type></type><methodname>PDO::prepare</methodname>
16+
<methodparam><type>string</type><parameter>query</parameter></methodparam>
17+
<methodparam choice="opt"><type>array</type><parameter>options</parameter><initializer>[]</initializer></methodparam>
1818
</methodsynopsis>
1919

2020
<para>
@@ -79,7 +79,7 @@
7979
<para>
8080
<variablelist>
8181
<varlistentry>
82-
<term><parameter>statement</parameter></term>
82+
<term><parameter>query</parameter></term>
8383
<listitem>
8484
<para>
8585
これは対象のデータベースサーバーに対して有効な SQL
@@ -88,7 +88,7 @@
8888
</listitem>
8989
</varlistentry>
9090
<varlistentry>
91-
<term><parameter>driver_options</parameter></term>
91+
<term><parameter>options</parameter></term>
9292
<listitem>
9393
<para>
9494
この配列は、このメソッドによって返される PDOStatement
@@ -177,7 +177,6 @@ $yellow = $sth->fetchAll();
177177
</para>
178178
</refsect1>
179179
</refentry>
180-
181180
<!-- Keep this comment at the end of the file
182181
Local variables:
183182
mode: sgml

reference/pdo/pdo/query.xml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: e41806c30bf6975e452c0d4ce35ab0984c2fa68c Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: c9c158137b0f4658c29faef4043472dc74896d0c Maintainer: takagi Status: ready -->
44
<!-- CREDITS: hirokawa,shimooka,mumumu -->
55
<refentry xml:id="pdo.query" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -12,29 +12,30 @@
1212
<refsect1 role="description">
1313
&reftitle.description;
1414
<methodsynopsis>
15-
<modifier>public</modifier> <type>PDOStatement</type><methodname>PDO::query</methodname>
16-
<methodparam><type>string</type><parameter>statement</parameter></methodparam>
15+
<modifier>public</modifier> <type class="union"><type>PDOStatement</type><type>false</type></type><methodname>PDO::query</methodname>
16+
<methodparam><type>string</type><parameter>query</parameter></methodparam>
17+
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>fetchMode</parameter><initializer>&null;</initializer></methodparam>
1718
</methodsynopsis>
1819

1920
<methodsynopsis>
20-
<modifier>public</modifier> <type>PDOStatement</type><methodname>PDO::query</methodname>
21-
<methodparam><type>string</type><parameter>statement</parameter></methodparam>
22-
<methodparam><type>int</type><parameter>fetch_style</parameter><initializer>PDO::FETCH_COLUMN</initializer></methodparam>
21+
<modifier>public</modifier> <type class="union"><type>PDOStatement</type><type>false</type></type><methodname>PDO::query</methodname>
22+
<methodparam><type>string</type><parameter>query</parameter></methodparam>
23+
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>fetchMode</parameter><initializer>PDO::FETCH_COLUMN</initializer></methodparam>
2324
<methodparam><type>int</type><parameter>colno</parameter></methodparam>
2425
</methodsynopsis>
2526

2627
<methodsynopsis>
27-
<modifier>public</modifier> <type>PDOStatement</type><methodname>PDO::query</methodname>
28-
<methodparam><type>string</type><parameter>statement</parameter></methodparam>
29-
<methodparam><type>int</type><parameter>fetch_style</parameter><initializer>PDO::FETCH_CLASS</initializer></methodparam>
28+
<modifier>public</modifier> <type class="union"><type>PDOStatement</type><type>false</type></type><methodname>PDO::query</methodname>
29+
<methodparam><type>string</type><parameter>query</parameter></methodparam>
30+
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>fetchMode</parameter><initializer>PDO::FETCH_CLASS</initializer></methodparam>
3031
<methodparam><type>string</type><parameter>classname</parameter></methodparam>
31-
<methodparam><type>array</type><parameter>ctorargs</parameter></methodparam>
32+
<methodparam><type>array</type><parameter>constructorArgs</parameter></methodparam>
3233
</methodsynopsis>
3334

3435
<methodsynopsis>
35-
<modifier>public</modifier> <type>PDOStatement</type><methodname>PDO::query</methodname>
36-
<methodparam><type>string</type><parameter>statement</parameter></methodparam>
37-
<methodparam><type>int</type><parameter>fetch_style</parameter><initializer>PDO::FETCH_INTO</initializer></methodparam>
36+
<modifier>public</modifier> <type class="union"><type>PDOStatement</type><type>false</type></type><methodname>PDO::query</methodname>
37+
<methodparam><type>string</type><parameter>query</parameter></methodparam>
38+
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>fetchMode</parameter><initializer>PDO::FETCH_INTO</initializer></methodparam>
3839
<methodparam><type>object</type><parameter>object</parameter></methodparam>
3940
</methodsynopsis>
4041

@@ -73,7 +74,7 @@
7374
<para>
7475
<variablelist>
7576
<varlistentry>
76-
<term><parameter>statement</parameter></term>
77+
<term><parameter>query</parameter></term>
7778
<listitem>
7879
<para>
7980
準備、発行する SQL ステートメント。
@@ -148,7 +149,6 @@ watermelon pink 90
148149

149150

150151
</refentry>
151-
152152
<!-- Keep this comment at the end of the file
153153
Local variables:
154154
mode: sgml

reference/pdo/pdo/quote.xml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8" ?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: e41806c30bf6975e452c0d4ce35ab0984c2fa68c Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: c9c158137b0f4658c29faef4043472dc74896d0c Maintainer: takagi Status: ready -->
44
<!-- CREDITS: shimooka -->
55
<refentry xml:id="pdo.quote" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -12,9 +12,9 @@
1212
<refsect1 role="description">
1313
&reftitle.description;
1414
<methodsynopsis>
15-
<modifier>public</modifier> <type>string</type><methodname>PDO::quote</methodname>
15+
<modifier>public</modifier> <type class="union"><type>string</type><type>false</type></type><methodname>PDO::quote</methodname>
1616
<methodparam><type>string</type><parameter>string</parameter></methodparam>
17-
<methodparam choice="opt"><type>int</type><parameter>parameter_type</parameter><initializer>PDO::PARAM_STR</initializer></methodparam>
17+
<methodparam choice="opt"><type>int</type><parameter>type</parameter><initializer>PDO::PARAM_STR</initializer></methodparam>
1818
</methodsynopsis>
1919

2020
<para>
@@ -66,7 +66,7 @@
6666
</listitem>
6767
</varlistentry>
6868
<varlistentry>
69-
<term><parameter>parameter_type</parameter></term>
69+
<term><parameter>type</parameter></term>
7070
<listitem>
7171
<para>
7272
クオートするスタイルを変更するため、
@@ -178,7 +178,6 @@ Quoted string: 'Co''mpl''''ex "st''"ring'
178178
</refsect1>
179179

180180
</refentry>
181-
182181
<!-- Keep this comment at the end of the file
183182
Local variables:
184183
mode: sgml

reference/pdo/pdo/setattribute.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<!-- $Revision$ -->
3-
<!-- EN-Revision: dbf319f8b2d859edf2b1342014c4dbdf6333b81c Maintainer: takagi Status: ready -->
3+
<!-- EN-Revision: c9c158137b0f4658c29faef4043472dc74896d0c Maintainer: takagi Status: ready -->
44
<!-- CREDITS: shimooka,mumumu -->
55
<refentry xml:id="pdo.setattribute" xmlns="http://docbook.org/ns/docbook">
66
<refnamediv>
@@ -14,7 +14,7 @@
1414
<methodsynopsis>
1515
<modifier>public</modifier> <type>bool</type><methodname>PDO::setAttribute</methodname>
1616
<methodparam><type>int</type><parameter>attribute</parameter></methodparam>
17-
<methodparam><type>mixed</type><parameter>value</parameter></methodparam>
17+
<methodparam><type class="union"><type>array</type><type>int</type></type><parameter>value</parameter></methodparam>
1818
</methodsynopsis>
1919

2020
<para>
@@ -113,7 +113,6 @@
113113
</refsect1>
114114

115115
</refentry>
116-
117116
<!-- Keep this comment at the end of the file
118117
Local variables:
119118
mode: sgml

0 commit comments

Comments
 (0)