cvs: phpdoc-de /language/predefined arrayaccess.xml interfaces.xml iterator.xml iteratoraggregate.xml serializable.xml traversable.xml

From: Date: Sun, 08 Feb 2009 19:54:23 +0000
Subject: cvs: phpdoc-de /language/predefined arrayaccess.xml interfaces.xml iterator.xml iteratoraggregate.xml serializable.xml traversable.xml
Groups: php.doc.de 
Request: Send a blank email to doc-de+get-3234@lists.php.net to get a copy of this message
sammywg Sun Feb 8 19:54:23 2009 UTC Added files: /phpdoc-de/language/predefined arrayaccess.xml interfaces.xml iterator.xml iteratoraggregate.xml serializable.xml traversable.xml Log: initial translation

http://cvs.php.net/viewvc.cgi/phpdoc-de/language/predefined/arrayaccess.xml?view=markup&rev=1.1 Index: phpdoc-de/language/predefined/arrayaccess.xml +++ phpdoc-de/language/predefined/arrayaccess.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: sammywg Status: ready --> <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>Das ArrayAccess-Interface</title> <titleabbrev>ArrayAccess</titleabbrev> <partintro> <!-- {{{ ArrayAccess intro --> <section xml:id="arrayaccess.intro"> &reftitle.intro; <para> Interface, um Objekte als Arrays ansprechen zu können </para> </section> <!-- }}} --> <section xml:id="arrayaccess.synopsis"> &reftitle.classsynopsis; <!-- {{{ Synopsis --> <classsynopsis> <ooclass><classname>ArrayAccess</classname></ooclass> <!-- {{{ Class synopsis --> <classsynopsisinfo> <ooclass> <classname>ArrayAccess</classname> </ooclass> </classsynopsisinfo> <!-- }}} --> <classsynopsisinfo role="comment">Methoden</classsynopsisinfo> <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.arrayaccess')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> </classsynopsis> <!-- }}} --> </section> <section xml:id="arrayaccess.examples"> <example xml:id="arrayaccess.example.basic"><!-- {{{ --> <title>Basisnutzung</title> <programlisting role="php"> <![CDATA[ <?php class obj implements arrayaccess { private $container = array(); public function __construct() { $this->container = array( "eins" => 1, "zwei" => 2, "drei" => 3, ); } public function offsetSet($offset, $value) { $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; } } $obj = new obj; var_dump(isset($obj["zwei"])); var_dump($obj["zwei"]); unset($obj["zwei"]); var_dump(isset($obj["zwei"])); $obj["zwei"] = "Ein Wert"; var_dump($obj["zwei"]); ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ bool(true) int(2) bool(false) string(7) "Ein Wert" ]]> </screen> </example><!-- }}} --> </section> </partintro> &language.predefined.arrayaccess.offsetexists; &language.predefined.arrayaccess.offsetget; &language.predefined.arrayaccess.offsetset; &language.predefined.arrayaccess.offsetunset; </phpdoc:classref> <!-- 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:"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 --> http://cvs.php.net/viewvc.cgi/phpdoc-de/language/predefined/interfaces.xml?view=markup&rev=1.1 Index: phpdoc-de/language/predefined/interfaces.xml +++ phpdoc-de/language/predefined/interfaces.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.4 Maintainer: sammywg Status: ready --> <part xml:id="reserved.interfaces" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> <title>Vordefinierte Interfaces</title> &language.predefined.traversable; &language.predefined.iterator; &language.predefined.iteratoraggregate; &language.predefined.arrayaccess; &language.predefined.serializable; </part> <!-- 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:"../../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 --> http://cvs.php.net/viewvc.cgi/phpdoc-de/language/predefined/iterator.xml?view=markup&rev=1.1 Index: phpdoc-de/language/predefined/iterator.xml +++ phpdoc-de/language/predefined/iterator.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.3 Maintainer: sammywg Status: ready --> <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>Das Iterator-Interface</title> <titleabbrev>Iterator</titleabbrev> <partintro> <!-- {{{ Iterator intro --> <section xml:id="iterator.intro"> &reftitle.intro; <para> Interface für externe Iteratoren oder Objekte, die selbstiterierend sind. </para> </section> <!-- }}} --> <section xml:id="iterator.synopsis"> &reftitle.classsynopsis; <!-- {{{ Synopsis --> <classsynopsis> <ooclass><classname>Iterator</classname></ooclass> <!-- {{{ Class synopsis --> <classsynopsisinfo> <ooclass> <classname>Iterator</classname> </ooclass> <oointerface> <interfacename>Traversable</interfacename> </oointerface> </classsynopsisinfo> <!-- }}} --> <classsynopsisinfo role="comment">Methoden</classsynopsisinfo> <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.iterator')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> </classsynopsis> <!-- }}} --> </section> <section xml:id="iterator.examples"> <example xml:id="iterator.example.basic"><!-- {{{ --> <title>Basisnutzung</title> <para> Dieses Beispiel demonstriert, in welcher Reihenfolge Methoden aufgerufen werden, wenn Sie <function>foreach</function> auf einem Iterator anwenden. </para> <programlisting role="php"> <![CDATA[ <?php class meinIterator implements Iterator { private $position = 0; private $array = array( "erstesElement", "zweitesElement", "letztesElement", ); public function __construct() { $this->position = 0; } function rewind() { var_dump(__METHOD__); $this->position = 0; } function current() { var_dump(__METHOD__); return $this->array[$this->position]; } function key() { var_dump(__METHOD__); return $this->position; } function next() { var_dump(__METHOD__); ++$this->position; } function valid() { var_dump(__METHOD__); return isset($this->array[$this->position]); } } $it = new meinIterator; foreach($it as $key => $value) { var_dump($key, $value); echo "\n"; } ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ string(18) "meinIterator::rewind" string(17) "meinIterator::valid" string(19) "meinIterator::current" string(15) "meinIterator::key" int(0) string(12) "erstesElement" string(16) "meinIterator::next" string(17) "meinIterator::valid" string(19) "meinIterator::current" string(15) "meinIterator::key" int(1) string(13) "zweitesElement" string(16) "meinIterator::next" string(17) "meinIterator::valid" string(19) "meinIterator::current" string(15) "meinIterator::key" int(2) string(11) "letztesElement" string(16) "meinIterator::next" string(17) "meinIterator::valid" ]]> </screen> </example><!-- }}} --> </section> </partintro> &language.predefined.iterator.current; &language.predefined.iterator.key; &language.predefined.iterator.next; &language.predefined.iterator.rewind; &language.predefined.iterator.valid; </phpdoc:classref> <!-- 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:"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 --> http://cvs.php.net/viewvc.cgi/phpdoc-de/language/predefined/iteratoraggregate.xml?view=markup&rev=1.1 Index: phpdoc-de/language/predefined/iteratoraggregate.xml +++ phpdoc-de/language/predefined/iteratoraggregate.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.1 Maintainer: sammywg Status: ready --> <phpdoc:classref xml:id="class.iteratoraggregate" 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>Das IteratorAggregate-Interface</title> <titleabbrev>IteratorAggregate</titleabbrev> <partintro> <!-- {{{ IteratorAggregate intro --> <section xml:id="iteratoraggregate.intro"> &reftitle.intro; <para> Interface, um einen externen Iterator zu erzeugen. </para> </section> <!-- }}} --> <section xml:id="iteratoraggregate.synopsis"> &reftitle.classsynopsis; <!-- {{{ Synopsis --> <classsynopsis> <ooclass><classname>IteratorAggregate</classname></ooclass> <!-- {{{ Class synopsis --> <classsynopsisinfo> <ooclass> <classname>IteratorAggregate</classname> </ooclass> <oointerface> <interfacename>Traversable</interfacename> </oointerface> </classsynopsisinfo> <!-- }}} --> <classsynopsisinfo role="comment">Methoden</classsynopsisinfo> <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.iteratoraggregate')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> </classsynopsis> <!-- }}} --> </section> <section xml:id="iteratoraggregate.examples"> <example xml:id="iteratoraggregate.example.basic"><!-- {{{ --> <title>Basisnutzung</title> <programlisting role="php"> <![CDATA[ <?php class meineDaten implements IteratorAggregate { public $property1 = "Öffentliche Eigenschaft eins"; public $property2 = "Öffentliche Eigenschaft zwei"; public $property3 = "Öffentliche Eigenschaft drei"; public function __construct() { $this->property4 = "letzte Eigenschaft"; } public function getIterator() { return new ArrayIterator($this); } } $obj = new meineDaten; foreach($obj as $key => $value) { var_dump($key, $value); echo "\n"; } ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ string(9) "property1" string(19) "Öffentliche Eigenschaft eins" string(9) "property2" string(19) "Öffentliche Eigenschaft zwei" string(9) "property3" string(21) "Öffentliche Eigenschaft drei" string(9) "property4" string(13) "letzte Eigenschaft" ]]> </screen> </example><!-- }}} --> </section> </partintro> &language.predefined.iteratoraggregate.getiterator; </phpdoc:classref> <!-- 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:"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 --> http://cvs.php.net/viewvc.cgi/phpdoc-de/language/predefined/serializable.xml?view=markup&rev=1.1 Index: phpdoc-de/language/predefined/serializable.xml +++ phpdoc-de/language/predefined/serializable.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: sammywg Status: ready --> <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>Das Serializable-Interface</title> <titleabbrev>Serializable</titleabbrev> <partintro> <!-- {{{ Serializable intro --> <section xml:id="serializable.intro"> &reftitle.intro; <para> Interface für benutzerdefiniertes Serialisieren. </para> <para> Klassen, die dieses Interface implementieren, unterstützen <link linkend="language.oop5.magic.sleep">__sleep</link> und <link linkend="language.oop5.magic.sleep">__wakeup</link> nicht mehr. Die Methode serialize wird immer aufgerufen, wenn eine Instanz serialisiert werden muss. Dabei wird weder __destruct() aufgerufen noch irgend ein anderer Seiteneffekt erzeugt, es sei denn, ein solcher wird in der Methode serialize explizit erzeugt. Wenn die Daten deserialisiert werden, ist die Klasse bekannt und die passende unserialize()-Methode wird anstelle des Konstruktors __construct() aufgerufen. Falls notwendig, kann der Standardkonstruktor innerhalb von unserialize() aufgerufen werden. constructor you may do so in the method </para> </section> <!-- }}} --> <section xml:id="serializable.synopsis"> &reftitle.classsynopsis; <!-- {{{ Synopsis --> <classsynopsis> <ooclass><classname>Serializable</classname></ooclass> <!-- {{{ Class synopsis --> <classsynopsisinfo> <ooclass> <classname>Serializable</classname> </ooclass> </classsynopsisinfo> <!-- }}} --> <classsynopsisinfo role="comment">Methoden</classsynopsisinfo> <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.serializable')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> </classsynopsis> <!-- }}} --> </section> <section xml:id="serializable.examples"> <example xml:id="serializable.example.basic"><!-- {{{ --> <title>Basisnutzung</title> <programlisting role="php"> <![CDATA[ <?php class obj implements Serializable { private $data; public function __construct() { $this->data = "Meine private-Daten"; } public function serialize() { return serialize($this->data); } public function unserialize($data) { $this->data = unserialize($data); } public function getData() { return $this->data; } } $obj = new obj; $ser = serialize($obj); $newobj = unserialize($ser); var_dump($newobj->getData()); ?> ]]> </programlisting> &example.outputs.similar; <screen> <![CDATA[ string(15) "Meine private-Daten" ]]> </screen> </example><!-- }}} --> </section> </partintro> &language.predefined.serializable.serialize; &language.predefined.serializable.unserialize; </phpdoc:classref> <!-- 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:"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 --> http://cvs.php.net/viewvc.cgi/phpdoc-de/language/predefined/traversable.xml?view=markup&rev=1.1 Index: phpdoc-de/language/predefined/traversable.xml +++ phpdoc-de/language/predefined/traversable.xml <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 1.1 $ --> <!-- EN-Revision: 1.2 Maintainer: sammywg Status: ready --> <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>Das Traversable-Interface</title> <titleabbrev>Traversable</titleabbrev> <partintro> <!-- {{{ Traversable intro --> <section xml:id="traversable.intro"> &reftitle.intro; <para> Interface, um herauszufinden, ob eine Klasse Traversierung verwendet <function>foreach</function>. </para> <para> Das abstrakte Interface kann nicht direkt implementiert werden. Stattdessen müssen Sie es entweder mittels <classname>IteratorAggregate</classname> oder <classname>Iterator</classname> implementieren. </para> <note> <para> Interne (eingebaute) Klassen, die dieses Interface implementieren, können in <function>foreach</function>-Konstrukten verwendet werden und benötigen keine explizite Implementierung von <classname>IteratorAggregate</classname> oder <classname>Iterator</classname>. </para> </note> <note> <para> Es handelt sich um ein internes Interface der Engine, das nicht in PHP-Skripten implementiert werden kann. Statt dessen müssen <classname>IteratorAggregate</classname> oder <classname>Iterator</classname> verwendet werden. </para> </note> </section> <!-- }}} --> <section xml:id="traversable.synopsis"> &reftitle.classsynopsis; <!-- {{{ Synopsis --> <classsynopsis> <ooclass><classname>Traversable</classname></ooclass> <!-- {{{ Class synopsis --> <classsynopsisinfo> <ooclass> <classname>Traversable</classname> </ooclass> </classsynopsisinfo> <!-- }}} --> </classsynopsis> <!-- }}} --> <para> Dieses Interface besitzt keine Methoden, sein einziger Sinn ist es, als Basisinterface für alle traversierbaren Klassen zu dienen. </para> </section> </partintro> </phpdoc:classref> <!-- 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:"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 -->
« previous php.doc.de (#3234) next »