Skip to content

Commit

Permalink
docs: update jsonserialize.xml and other mysqli files. (#285)
Browse files Browse the repository at this point in the history
* docs: update jsonserialize.xml and other mysqli files.

* Tradução em changelog.

* Linha faltantte.

---------

Co-authored-by: Marcos Marcolin <[email protected]>
Co-authored-by: alfsb <[email protected]>
  • Loading branch information
3 people authored Jun 25, 2023
1 parent 9d54c2e commit ee4ad20
Show file tree
Hide file tree
Showing 7 changed files with 129 additions and 77 deletions.
8 changes: 6 additions & 2 deletions reference/json/jsonserializable/jsonserialize.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: a605fd10c648c8d4cd8315d62a1341323484338e Maintainer: marcosmarcolin Status: ready --><!-- CREDITS: marcosmarcolin -->
<!-- EN-Revision: 3d898cf4660609f2c1f55591ffd1556e8cd6d702 Maintainer: marcosmarcolin Status: ready --><!-- CREDITS: marcosmarcolin -->
<refentry xml:id="jsonserializable.jsonserialize" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
<refname>JsonSerializable::jsonSerialize</refname>
Expand Down Expand Up @@ -43,6 +43,7 @@
<![CDATA[
<?php
class ArrayValue implements JsonSerializable {
private $array;
public function __construct(array $array) {
$this->array = $array;
}
Expand Down Expand Up @@ -77,6 +78,7 @@ echo json_encode(new ArrayValue($array), JSON_PRETTY_PRINT);
<![CDATA[
<?php
class ArrayValue implements JsonSerializable {
private $array;
public function __construct(array $array) {
$this->array = $array;
}
Expand Down Expand Up @@ -110,8 +112,9 @@ echo json_encode(new ArrayValue($array), JSON_PRETTY_PRINT);
<![CDATA[
<?php
class IntegerValue implements JsonSerializable {
private $number;
public function __construct($number) {
$this->number = (integer) $number;
$this->number = (int) $number;
}
public function jsonSerialize() {
Expand Down Expand Up @@ -139,6 +142,7 @@ echo json_encode(new IntegerValue(1), JSON_PRETTY_PRINT);
<![CDATA[
<?php
class StringValue implements JsonSerializable {
private $string;
public function __construct($string) {
$this->string = (string) $string;
}
Expand Down
86 changes: 55 additions & 31 deletions reference/mysqli/mysqli/construct.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 63b99082ef83eade08151f8cb528246fded81db9 Maintainer: marcosmarcolin Status: ready --><!-- CREDITS: marcosmarcolin -->
<!-- EN-Revision: 2d77c9fe145f74663128006eb71662b0c44e8987 Maintainer: marcosmarcolin Status: ready --><!-- CREDITS: marcosmarcolin -->
<refentry xml:id="mysqli.construct" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mysqli::__construct</refname>
Expand All @@ -13,31 +13,31 @@
<para>&style.oop;</para>
<constructorsynopsis role="mysqli">
<modifier>public</modifier> <methodname>mysqli::__construct</methodname>
<methodparam choice="opt"><type>string</type><parameter>hostname</parameter><initializer>ini_get("mysqli.default_host")</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>username</parameter><initializer>ini_get("mysqli.default_user")</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>password</parameter><initializer>ini_get("mysqli.default_pw")</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>database</parameter><initializer>""</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>port</parameter><initializer>ini_get("mysqli.default_port")</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>socket</parameter><initializer>ini_get("mysqli.default_socket")</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>hostname</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>username</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>password</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>database</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>port</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>socket</parameter><initializer>&null;</initializer></methodparam>
</constructorsynopsis>
<methodsynopsis role="mysqli">
<modifier>public</modifier> <type>void</type><methodname>mysqli::connect</methodname>
<methodparam choice="opt"><type>string</type><parameter>hostname</parameter><initializer>ini_get("mysqli.default_host")</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>username</parameter><initializer>ini_get("mysqli.default_user")</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>password</parameter><initializer>ini_get("mysqli.default_pw")</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>database</parameter><initializer>""</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>port</parameter><initializer>ini_get("mysqli.default_port")</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>socket</parameter><initializer>ini_get("mysqli.default_socket")</initializer></methodparam>
<modifier>public</modifier> <type>bool</type><methodname>mysqli::connect</methodname>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>hostname</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>username</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>password</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>database</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>port</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>socket</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>&style.procedural;</para>
<methodsynopsis>
<type class="union"><type>mysqli</type><type>false</type></type><methodname>mysqli_connect</methodname>
<methodparam choice="opt"><type>string</type><parameter>hostname</parameter><initializer>ini_get("mysqli.default_host")</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>username</parameter><initializer>ini_get("mysqli.default_user")</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>password</parameter><initializer>ini_get("mysqli.default_pw")</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>database</parameter><initializer>""</initializer></methodparam>
<methodparam choice="opt"><type>int</type><parameter>port</parameter><initializer>ini_get("mysqli.default_port")</initializer></methodparam>
<methodparam choice="opt"><type>string</type><parameter>socket</parameter><initializer>ini_get("mysqli.default_socket")</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>hostname</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>username</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>password</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>database</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>int</type><type>null</type></type><parameter>port</parameter><initializer>&null;</initializer></methodparam>
<methodparam choice="opt"><type class="union"><type>string</type><type>null</type></type><parameter>socket</parameter><initializer>&null;</initializer></methodparam>
</methodsynopsis>
<para>
Abre uma conexão com o servidor MySQL.
Expand All @@ -52,8 +52,8 @@
<term><parameter>hostname</parameter></term>
<listitem>
<para>
Pode ser um nome de host ou um endereço IP. O host local é
assumido ao passar o valor &null; ou a string "localhost" para este parâmetro.
Pode ser um nome de host ou um endereço IP. Ao passar &null;, o valor é recuperado de
<link linkend="ini.mysqli.default-host">mysqli.default_host</link>.
Quando possível, serão usados pipes em vez do protocolo TCP/IP.
O protocolo TCP/IP é usado se um nome de host e um número de porta forem fornecidos juntos, por ex. <literal>localhost:3308</literal>.
</para>
Expand All @@ -68,43 +68,43 @@
<term><parameter>username</parameter></term>
<listitem>
<para>
O nome de usuário do MySQL.
O nome de usuário do MySQL ou &null; para assumir o nome de usuário com base no
<link linkend="ini.mysqli.default-user">mysqli.default_user</link> opção ini.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>password</parameter></term>
<listitem>
<para>
Se não for fornecido ou for &null;, o servidor MySQL tentará autenticar
o usuário apenas nos registros de usuário que não possuem senha. Isso
permite que um nome de usuário seja usado com diferentes permissões (dependendo
se uma senha é fornecida ou não).
A senha do MySQL ou &null; para assumir a senha com base na opção ini
<link linkend="ini.mysqli.default-pw">mysqli.default_pw</link>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>database</parameter></term>
<listitem>
<para>
Se fornecido, especificará o banco de dados padrão a ser usado ao
realizar consultas.
O banco de dados padrão a ser usado ao realizar consultas ou &null;.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>port</parameter></term>
<listitem>
<para>
Especifica o número da porta para tentar se conectar ao servidor MySQL.
O número da porta para tentar conectar ao servidor MySQL ou &null; para assumir a porta com base na opção
<link linkend="ini.mysqli.default-port">mysqli.default_port</link>.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><parameter>socket</parameter></term>
<listitem>
<para>
Especifica o socket ou pipe nomeado que deve ser usado.
O socket ou pipe nomeado que deve ser usado ou &null; para assumir o socket com base na opção ini
<link linkend="ini.mysqli.default-socket">mysqli.default_socket</link>.
</para>
<note>
<para>
Expand Down Expand Up @@ -141,6 +141,30 @@
&mysqli.conditionalexception;
</refsect1>

<refsect1 role="changelog">
&reftitle.changelog;
<para>
<informaltable>
<tgroup cols="2">
<thead>
<row>
<entry>&Version;</entry>
<entry>&Description;</entry>
</row>
</thead>
<tbody>
<row>
<entry>7.4.0</entry>
<entry>
Todos os parâmetros podem ser null.
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
</para>
</refsect1>

<refsect1 role="examples">
&reftitle.examples;
<example>
Expand Down
4 changes: 2 additions & 2 deletions reference/mysqli/mysqli/query.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: ec946465e5ee9dc4dc19f1a28510697066a19eac Maintainer: marcosmarcolin Status: ready --><!-- CREDITS: marcosmarcolin -->
<!-- EN-Revision: d470f625f96a83d65464619297cccad7ce46e743 Maintainer: marcosmarcolin Status: ready --><!-- CREDITS: marcosmarcolin -->
<refentry xml:id="mysqli.query" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>mysqli::query</refname>
Expand All @@ -25,6 +25,7 @@
<para>
Executa uma <parameter>consulta</parameter> no banco de dados.
</para>
&mysqli.sqlinjection.warning;
<para>
Para consultas não-DML (não INSERT, UPDATE ou DELETE),
esta função é semelhante a chamar
Expand Down Expand Up @@ -77,7 +78,6 @@
<para>
A string de consulta.
</para>
&mysqli.sqlinjection.warning;
</listitem>
</varlistentry>
<varlistentry>
Expand Down
Loading

0 comments on commit ee4ad20

Please sign in to comment.