Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Easy fixes #295

Merged
merged 4 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions reference/array/functions/array-count-values.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- EN-Revision: 9009f8104bfeb5a22e78987c0a8af05473b3ac45 Maintainer: lhsazevedo Status: ready --><!-- CREDITS: lucasr, fabioluciano, lhsazevedo -->
<!-- EN-Revision: 6b56e6f444e49396ee5122258ee85b99a8543f6a Maintainer: lhsazevedo Status: ready --><!-- CREDITS: lucasr, fabioluciano, lhsazevedo, airtonzanon -->
<refentry xml:id="function.array-count-values" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>array_count_values</refname>
<refpurpose>Conta todos os valores de um array</refpurpose>
<refpurpose>Conta as ocorrências de cada valor distinto em um array</refpurpose>
</refnamediv>

<refsect1 role="description">
Expand Down
64 changes: 53 additions & 11 deletions reference/classobj/functions/get-class-vars.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- EN-Revision: e41806c30bf6975e452c0d4ce35ab0984c2fa68c Maintainer: felipe Status: ready --><!-- CREDITS: surfmax, adiel -->
<!-- EN-Revision: c44475e1fafcbee203ed4935a6d5d7a01379fcdc Maintainer: airtonzanon Status: ready --><!-- CREDITS: surfmax, adiel, felipe, airtonzanon -->
<refentry xml:id="function.get-class-vars" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>get_class_vars</refname>
Expand All @@ -9,7 +9,7 @@
&reftitle.description;
<methodsynopsis>
<type>array</type><methodname>get_class_vars</methodname>
<methodparam><type>string</type><parameter>class_name</parameter></methodparam>
<methodparam><type>string</type><parameter>class</parameter></methodparam>
</methodsynopsis>
<para>
Obtém as propriedades padrão de uma dada classe.
Expand All @@ -20,7 +20,7 @@
<para>
<variablelist>
<varlistentry>
<term><parameter>class_name</parameter></term>
<term><parameter>class</parameter></term>
<listitem>
<para>
O nome da classe
Expand All @@ -33,9 +33,11 @@
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Retorna um array associativo das propriedades públicas padrão da classe.
Retorna um array associativo das propriedades declaradas visíveis no
escopo atual, com seu valor padrão.
Os elementos do array resultante estão na forma de
<literal>nome da variável => valor</literal>.
<literal>nome da variável =&gt; valor</literal>.
Em caso de um erro, retornará &false;.
</para>
</refsect1>
<refsect1 role="examples">
Expand Down Expand Up @@ -78,14 +80,55 @@ foreach ($class_vars as $name => $value) {
&example.outputs;
<screen>
<![CDATA[
// Anteriormente ao PHP 4.2.0
var2 : xyz
var3 : 100

// Apartir do PHP 4.2.0
var1 :
var2 : xyz
var3 : 100
]]>
</screen>
</example>
</para>
<para>
<example>
<title><function>get_class_vars</function> and scoping behaviour</title>
<programlisting role="php">
<![CDATA[
<?php
function format($array)
{
return implode('|', array_keys($array)) . "\r\n";
}

class TestCase
{
public $a = 1;
protected $b = 2;
private $c = 3;

public static function expose()
{
echo format(get_class_vars(__CLASS__));
}
}

TestCase::expose();
echo format(get_class_vars('TestCase'));
?>
]]>
</programlisting>
&example.outputs;
<screen>
<![CDATA[
// 5.0.0
a| * b| TestCase c
a| * b| TestCase c

// 5.0.1 - 5.0.2
a|b|c
a|b|c

// 5.0.3 +
a|b|c
a
]]>
</screen>
</example>
Expand All @@ -101,7 +144,6 @@ var3 : 100
</para>
</refsect1>
</refentry>

<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
Expand Down
9 changes: 8 additions & 1 deletion reference/classobj/functions/get-declared-interfaces.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- EN-Revision: 2fd3f0c96d9d221fe37109775af4df4cf949d5d8 Maintainer: narigone Status: ready -->
<!-- EN-Revision: 6846ebb4e33d51faee4a1e99c241a7a24861e0e4 Maintainer: narigone Status: ready -->
<refentry xml:id="function.get-declared-interfaces" xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>get_declared_interfaces</refname>
Expand All @@ -15,6 +15,12 @@
Retorna as interfaces declaradas.
</para>
</refsect1>

<refsect1 role="parameters">
&reftitle.parameters;
&no.function.parameters;
</refsect1>

<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
Expand Down Expand Up @@ -56,6 +62,7 @@ Array
&reftitle.seealso;
<para>
<simplelist>
<member><function>interface_exists</function></member>
<member><function>get_declared_classes</function></member>
<member><function>class_implements</function></member>
</simplelist>
Expand Down
3 changes: 1 addition & 2 deletions reference/classobj/functions/get-declared-traits.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- EN-Revision: 16f192be4e65f8683dc2ac8d7c8db66db2da36c0 Maintainer: none Status: ready --><!-- CREDITS: everaldofilho -->
<!-- EN-Revision: 11960da656e7a47ee58b0dbfc733e2231973b91c Maintainer: none Status: ready --><!-- CREDITS: everaldofilho, airtonzanon -->

<refentry xml:id="function.get-declared-traits" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<refnamediv>
Expand Down Expand Up @@ -28,7 +28,6 @@
&reftitle.returnvalues;
<para>
Retorna um array com todos os nomes das traids declaradas em seus valores.
Retorna &null; em caso de falha.
</para>
</refsect1>

Expand Down