svn: /phpdoc/tr/trunk/language/predefined/ arrayaccess.xml errorexception.xml exception.xml exceptions.xml interfaces.xml iterator.xml serializable.xml traversable.xml
[email protected] (Nilgün Belma Bugüner)
| Newsgroups | php.doc.tr |
|---|---|
| Message-ID | <[email protected]> |
nilgun Sun, 14 Oct 2018 10:45:15 +0000
Revision: http://svn.php.net/viewvc?view=revision&revision=345816
Log:
update for sync with English docs.
Changed paths:
U phpdoc/tr/trunk/language/predefined/arrayaccess.xml
U phpdoc/tr/trunk/language/predefined/errorexception.xml
U phpdoc/tr/trunk/language/predefined/exception.xml
U phpdoc/tr/trunk/language/predefined/exceptions.xml
U phpdoc/tr/trunk/language/predefined/interfaces.xml
U phpdoc/tr/trunk/language/predefined/iterator.xml
U phpdoc/tr/trunk/language/predefined/serializable.xml
U phpdoc/tr/trunk/language/predefined/traversable.xml
svn-diffs-345816.txt
(text/x-diff, 14.9 KB)
Modified: phpdoc/tr/trunk/language/predefined/arrayaccess.xml
===================================================================
--- phpdoc/tr/trunk/language/predefined/arrayaccess.xml 2018-10-14 09:34:56 UTC (rev 345815)
+++ phpdoc/tr/trunk/language/predefined/arrayaccess.xml 2018-10-14 10:45:15 UTC (rev 345816)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 292734 Maintainer: haluk Status: ready -->
+<!-- EN-Revision: 335080 Maintainer: nilgun Status: ready -->
+<!-- CREDITS: haluk -->
<phpdoc:classref xml:id="class.arrayaccess" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title><code>ArrayAccess</code> arayüzü</title>
@@ -45,8 +46,9 @@
<programlisting role="php">
<![CDATA[
<?php
-class obj implements arrayaccess {
+class obj implements ArrayAccess {
private $container = array();
+
public function __construct() {
$this->container = array(
"bir" => 1,
@@ -54,15 +56,23 @@
"üç" => 3,
);
}
+
public function offsetSet($offset, $value) {
- $this->container[$offset] = $value;
+ if (is_null($offset)) {
+ $this->container[] = $value;
+ } else {
+ $this->container[$offset] = $value;
+ }
}
+
public function offsetExists($offset) {
return isset($this->container[$offset]);
}
+
public function offsetUnset($offset) {
unset($this->container[$offset]);
}
+
public function offsetGet($offset) {
return isset($this->container[$offset]) ? $this->container[$offset] : null;
}
@@ -77,6 +87,11 @@
$obj["iki"] = "Bir değer";
var_dump($obj["iki"]);
+$obj[] = 'Ek 1';
+$obj[] = 'Ek 2';
+$obj[] = 'Ek 3';
+print_r($obj);
+
?>
]]>
</programlisting>
@@ -87,6 +102,19 @@
int(2)
bool(false)
string(7) "Bir değer"
+obj Object
+(
+ [container:obj:private] => Array
+ (
+ [bir] => 1
+ [üç] => 3
+ [iki] => Bir değer
+ [0] => Ek 1
+ [1] => Ek 2
+ [2] => Ek 3
+ )
+
+)
]]>
</screen>
</example><!-- }}} -->
Modified: phpdoc/tr/trunk/language/predefined/errorexception.xml
===================================================================
--- phpdoc/tr/trunk/language/predefined/errorexception.xml 2018-10-14 09:34:56 UTC (rev 345815)
+++ phpdoc/tr/trunk/language/predefined/errorexception.xml 2018-10-14 10:45:15 UTC (rev 345816)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 292734 Maintainer: haluk Status: ready -->
+<!-- EN-Revision: 336073 Maintainer: nilgun Status: ready -->
+<!-- CREDITS: haluk -->
<phpdoc:exceptionref xml:id="class.errorexception"
xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
@@ -47,6 +48,9 @@
<varname linkend="errorexception.props.severity">severity</varname>
</fieldsynopsis>
+ <classsynopsisinfo role="comment">&InheritedProperties;</classsynopsisinfo>
+ <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('exception.synopsis')/descendant::db:fieldsynopsis)" />
+
<classsynopsisinfo role="comment">&Methods;</classsynopsisinfo>
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.errorexception')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[1])" />
<xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.errorexception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" />
@@ -94,12 +98,12 @@
&example.outputs.similar;
<screen>
<![CDATA[
-Fatal error: Uncaught exception 'ErrorException' with message 'Wrong parameter count for strpos()' in /home/bjori/tmp/ex.php:8
+Fatal error: Uncaught exception 'ErrorException' with message 'strpos() expects at least 2 parameters, 0 given' in /home/bjori/tmp/ex.php:12
Stack trace:
-#0 [internal function]: exception_error_handler(2, 'Wrong parameter...', '/home/bjori/php...', 8, Array)
-#1 /home/bjori/php/cleandocs/test.php(8): strpos()
+#0 [internal function]: exception_error_handler(2, 'strpos() expect...', '/home/bjori/php...', 12, Array)
+#1 /home/bjori/php/cleandocs/test.php(12): strpos()
#2 {main}
- thrown in /home/bjori/tmp/ex.php on line 8
+ thrown in /home/bjori/tmp/ex.php on line 12
]]>
</screen>
</example><!-- }}} -->
Modified: phpdoc/tr/trunk/language/predefined/exception.xml
===================================================================
--- phpdoc/tr/trunk/language/predefined/exception.xml 2018-10-14 09:34:56 UTC (rev 345815)
+++ phpdoc/tr/trunk/language/predefined/exception.xml 2018-10-14 10:45:15 UTC (rev 345816)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 298830 Maintainer: haluk Status: ready -->
+<!-- EN-Revision: 345149 Maintainer: nilgun Status: ready -->
+<!-- CREDITS: haluk -->
<phpdoc:exceptionref xml:id="class.exception"
xmlns="http://docbook.org/ns/docbook"
xmlns:xlink="http://www.w3.org/1999/xlink"
@@ -15,9 +16,13 @@
<section xml:id="exception.intro">
&reftitle.intro;
<para>
- <ooclass><classname>Exception</classname></ooclass> tüm istisnalar için
- temel sınıftır.
+ <ooclass><classname>Exception</classname></ooclass> PHP5'te tüm istisnalar
+ için ve PHP7'de tüm kullanıcı istisnaları için temel sınıftır.
</para>
+ <para>
+ PHP 7 öncesinde, <classname>Exception</classname> sınıfı
+ <classname>Throwable</classname> arayüzünü gerçeklemiyordu.
+ </para>
</section>
<!-- }}} -->
@@ -26,7 +31,9 @@
<!-- {{{ Synopsis -->
<classsynopsis>
- <ooclass><classname>Exception</classname></ooclass>
+ <ooclass>
+ <classname>Exception</classname>
+ </ooclass>
<!-- {{{ Class synopsis -->
<classsynopsisinfo>
@@ -33,6 +40,11 @@
<ooclass>
<classname>Exception</classname>
</ooclass>
+
+ <ooclass>
+ <modifier>implements</modifier>
+ <classname>Throwable</classname>
+ </ooclass>
</classsynopsisinfo>
<!-- }}} -->
Modified: phpdoc/tr/trunk/language/predefined/exceptions.xml
===================================================================
--- phpdoc/tr/trunk/language/predefined/exceptions.xml 2018-10-14 09:34:56 UTC (rev 345815)
+++ phpdoc/tr/trunk/language/predefined/exceptions.xml 2018-10-14 10:45:15 UTC (rev 345816)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 288721 Maintainer: haluk Status: ready -->
+<!-- EN-Revision: 345757 Maintainer: nilgun Status: ready -->
+<!-- CREDITS: haluk -->
<part xml:id="reserved.exceptions" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Öntanımlı İstisnalar</title>
@@ -13,6 +14,16 @@
&language.predefined.exception;
&language.predefined.errorexception;
+ <!-- If this is updated, you should also update the hierarchy in
+ language/errors/php7.xml. -->
+ &language.predefined.error;
+ &language.predefined.argumentcounterror;
+ &language.predefined.arithmeticerror;
+ &language.predefined.assertionerror;
+ &language.predefined.divisionbyzeroerror;
+ &language.predefined.compileerror;
+ &language.predefined.parseerror;
+ &language.predefined.typeerror;
</part>
<!-- Keep this comment at the end of the file
Modified: phpdoc/tr/trunk/language/predefined/interfaces.xml
===================================================================
--- phpdoc/tr/trunk/language/predefined/interfaces.xml 2018-10-14 09:34:56 UTC (rev 345815)
+++ phpdoc/tr/trunk/language/predefined/interfaces.xml 2018-10-14 10:45:15 UTC (rev 345816)
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 330333 Maintainer: nilgun Status: ready -->
+<!-- EN-Revision: 337170 Maintainer: nilgun Status: ready -->
<!-- CREDITS: haluk -->
<part xml:id="reserved.interfaces" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
<title>Öntanımlı Arayüzler ve Sınıflar</title>
@@ -15,6 +15,7 @@
&language.predefined.traversable;
&language.predefined.iterator;
&language.predefined.iteratoraggregate;
+ &language.predefined.throwable;
&language.predefined.arrayaccess;
&language.predefined.serializable;
&language.predefined.closure;
Modified: phpdoc/tr/trunk/language/predefined/iterator.xml
===================================================================
--- phpdoc/tr/trunk/language/predefined/iterator.xml 2018-10-14 09:34:56 UTC (rev 345815)
+++ phpdoc/tr/trunk/language/predefined/iterator.xml 2018-10-14 10:45:15 UTC (rev 345816)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 292734 Maintainer: haluk Status: ready -->
+<!-- EN-Revision: 342004 Maintainer: nilgun Status: ready -->
+<!-- CREDITS: haluk -->
<phpdoc:classref xml:id="class.iterator" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title>Iterator Arayüzü</title>
@@ -44,8 +45,17 @@
<!-- }}} -->
</section>
+
+ <section xml:id="iterator.iterators">
+ <title>Öntanımlı Yineleyiciler</title>
+ <para>
+ PHP birçok günlük görev için bir miktar yineleyici zaten sağlamaktadır.
+ Listesi için bkz: <link linkend="spl.iterators">SPL yineleyicileri</link>
+ </para>
+ </section>
<section xml:id="iterator.examples">
+ &reftitle.examples;
<example xml:id="iterator.example.basic"><!-- {{{ -->
<title>Temel Kullanımı</title>
<para>
@@ -67,27 +77,27 @@
$this->position = 0;
}
- function rewind() {
+ public function rewind() {
var_dump(__METHOD__);
$this->position = 0;
}
- function current() {
+ public function current() {
var_dump(__METHOD__);
return $this->array[$this->position];
}
- function key() {
+ public function key() {
var_dump(__METHOD__);
return $this->position;
}
- function next() {
+ public function next() {
var_dump(__METHOD__);
++$this->position;
}
- function valid() {
+ public function valid() {
var_dump(__METHOD__);
return isset($this->array[$this->position]);
}
Modified: phpdoc/tr/trunk/language/predefined/serializable.xml
===================================================================
--- phpdoc/tr/trunk/language/predefined/serializable.xml 2018-10-14 09:34:56 UTC (rev 345815)
+++ phpdoc/tr/trunk/language/predefined/serializable.xml 2018-10-14 10:45:15 UTC (rev 345816)
@@ -1,6 +1,7 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 292734 Maintainer: haluk Status: ready -->
+<!-- EN-Revision: 345303 Maintainer: nilgun Status: ready -->
+<!-- CREDITS: haluk -->
<phpdoc:classref xml:id="class.serializable" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
<title><code>Serializable</code> arayüzü</title>
@@ -16,9 +17,10 @@
</para>
<para>
- Bu arayüzü gerçekleyen sınıflar <link linkend="language.oop5.magic.sleep"
- >__sleep()</link> ve <link linkend="language.oop5.magic.sleep"
- >__wakeup()</link> işlevlerini desteklemezler. Bir örneğin
+ Bu arayüzü gerçekleyen sınıflar
+ <link linkend="object.sleep">__sleep()</link> ve
+ <link linkend="object.wakeup">__wakeup()</link>
+ işlevlerini desteklemezler. Bir örneğin
dizgeleştirilmesi gerektiğinde <code>serialize</code> yöntemi çağrılır.
Bunun <code>__destruct()</code> çağırmak veya yöntem içinde tanımlanmamış
bir işlemi yapmak gibi bir yan etkisi yoktur. Dizgeleştirilmiş nesne
@@ -55,7 +57,7 @@
<section xml:id="serializable.examples">
<example xml:id="serializable.example.basic"><!-- {{{ -->
- <title>Temel kullanım</title>
+ <title>- Temel kullanım</title>
<programlisting role="php">
<![CDATA[
<?php
@@ -62,7 +64,7 @@
class obj implements Serializable {
private $data;
public function __construct() {
- $this->data = "Özel verim";
+ $this->data = "My private data";
}
public function serialize() {
return serialize($this->data);
@@ -78,6 +80,8 @@
$obj = new obj;
$ser = serialize($obj);
+var_dump($ser);
+
$newobj = unserialize($ser);
var_dump($newobj->getData());
@@ -87,7 +91,8 @@
&example.outputs.similar;
<screen>
<![CDATA[
-string(11) "Özel verim"
+string(38) "C:3:"obj":23:{s:15:"My private data";}"
+string(15) "My private data"
]]>
</screen>
</example><!-- }}} -->
Modified: phpdoc/tr/trunk/language/predefined/traversable.xml
===================================================================
--- phpdoc/tr/trunk/language/predefined/traversable.xml 2018-10-14 09:34:56 UTC (rev 345815)
+++ phpdoc/tr/trunk/language/predefined/traversable.xml 2018-10-14 10:45:15 UTC (rev 345816)
@@ -1,9 +1,10 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- $Revision$ -->
-<!-- EN-Revision: 288721 Maintainer: haluk Status: ready -->
+<!-- EN-Revision: 338957 Maintainer: nilgun Status: ready -->
+<!-- CREDITS: haluk -->
<phpdoc:classref xml:id="class.traversable" xmlns:phpdoc="http://php.net/ns/phpdoc" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude">
- <title>Traversable arayüzü</title>
+ <title><interfacename>Traversable</interfacename> arayüzü</title>
<titleabbrev>Traversable</titleabbrev>
<partintro>
@@ -16,21 +17,23 @@
</para>
<para>
Tek başına gerçeklenemeyen bir soyut temel arayüz olup ya
- <classname>IteratorAggregate</classname> ya da
- <classname>Iterator</classname> olarak gerçeklenmelidir.
+ <interfacename>IteratorAggregate</interfacename> ya da
+ <interfacename>Iterator</interfacename> olarak gerçeklenmelidir.
</para>
<note>
<para>
Bu arayüzü gerçekleyen yerleşik sınıflar bir &foreach;
- oluşumunda kullanılabilir ve <classname>IteratorAggregate</classname> ya
- da <classname>Iterator</classname> olarak gerçeklenmeleri gerekmez.
+ oluşumunda kullanılabilir ve <interfacename>IteratorAggregate</interfacename> ya
+ da <interfacename>Iterator</interfacename> olarak gerçeklenmeleri gerekmez.
</para>
</note>
<note>
<para>
Bu dahili bir motor arayüz olup PHP betiklerinde gerçeklenemez. Yerine
- <classname>IteratorAggregate</classname> veya
- <classname>Iterator</classname> kullanılmalıdır.
+ <interfacename>IteratorAggregate</interfacename> veya
+ <interfacename>Iterator</interfacename> kullanılmalıdır.
+ Traversable arayüzünü genişleten bir arayüzü gerçeklerken, implements sözcüğünden önce <interfacename>IteratorAggregate</interfacename> veya
+ <interfacename>Iterator</interfacename> yazdığınızdan emin olun.
</para>
</note>
</section>