mirror of
https://github.com/php/doc-pl.git
synced 2026-03-25 23:52:07 +01:00
Well, it doesn't really make the Polish manual much better but it does reduce the amount of outdated files substantially leaving the ones that deserve some actual work and thought.
131 lines
3.6 KiB
XML
131 lines
3.6 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- EN-Revision: ed312486fff2251b6625b017df2e8f847f656296 Maintainer: sobak Status: ready -->
|
|
<!-- $Revision$ -->
|
|
<refentry xml:id="arrayaccess.offsetget" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>ArrayAccess::offsetGet</refname>
|
|
<refpurpose>Offset do pobrania</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis role="ArrayAccess">
|
|
<modifier>public</modifier> <type>mixed</type><methodname>ArrayAccess::offsetGet</methodname>
|
|
<methodparam><type>mixed</type><parameter>offset</parameter></methodparam>
|
|
</methodsynopsis>
|
|
<para>
|
|
Zwraca wartość dla podanego offsetu.
|
|
</para>
|
|
<para>
|
|
Ta metoda jest wykonywana podczas sprawdzania offsetu za pomocą <function>empty</function>.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
<para>
|
|
<variablelist>
|
|
<varlistentry>
|
|
<term><parameter>offset</parameter></term>
|
|
<listitem>
|
|
<para>
|
|
Offset do pobrania.
|
|
</para>
|
|
</listitem>
|
|
</varlistentry>
|
|
</variablelist>
|
|
</para>
|
|
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
Może zwrócić wartość dowolnego typu.
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="notes">
|
|
&reftitle.notes;
|
|
<note>
|
|
<para>
|
|
Możliwe jest, aby implementacje tej metody zwracały wartość przez referencję.
|
|
To sprawia na pośrednie zmiany do przeciążonych wymiarów tablic obiektów
|
|
<classname>ArrayAccess</classname>.
|
|
</para>
|
|
<para>
|
|
Modyfikacja bezpośrednia to taka, która całkowicie zastępuje wartość
|
|
wymiaru tablicy, na przykład <literal>$obj[6] = 7</literal>. Zaś
|
|
modyfikacja pośrednia zmienia tylko część wymiaru
|
|
lub próbuje przypisać wymiar przez referencję,
|
|
do innej zmiennej, na przykład <literal>$obj[6][7] = 7</literal> lub
|
|
<literal>$var =& $obj[6]</literal>. Implementacja za pomocą
|
|
<literal>++</literal> i dekrementacja przez <literal>--</literal>
|
|
zostały również zaimplementowane w sposób, który wymaga modyfikacji pośredniej.
|
|
</para>
|
|
<para>
|
|
Modyfikacja bezpośrednia powoduje wywołanie metody
|
|
<function>ArrayAccess::offsetSet</function>, zaś pośrednia
|
|
wywołanie <function>ArrayAccess::offsetGet</function>.
|
|
W takim wypadku implementacja
|
|
<function>ArrayAccess::offsetGet</function> musi być zdolna do zwracania
|
|
przez referencję, w przeciwnym wypadku zostanie wygenerowany <constant>E_NOTICE</constant>.
|
|
</para>
|
|
</note>
|
|
</refsect1>
|
|
|
|
<!--
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><function>ArrayAccess::offsetGet</function> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
/* ... */
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
...
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
-->
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><methodname>ArrayAccess::offsetExists</methodname></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|