Contributions are ready for review

From: Date: Mon, 13 Nov 2017 13:00:03 +0000
Subject: Contributions are ready for review
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-5035@lists.php.net to get a copy of this message
Hello PHP ZH Documentation team, There are contributions within the online editor queue for this language. Please review, then commit or delete these patches. Patches for review : ----------------------- New file: zh/reference/spl/badfunctioncallexception.xml By: Rambone on 2016-09-06 19:08:04 =================================================================== --- zh/reference/spl/badfunctioncallexception.xml +++ zh/reference/spl/badfunctioncallexception.xml @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: $ --> +<!-- EN-Revision: 330314 Maintainer: Rambone Status: ready --> +<!-- Reviewed: no --> + +<phpdoc:exceptionref xml:id="class.badfunctioncallexception" + xmlns:phpdoc="http://php.net/ns/phpdoc" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns="http://docbook.org/ns/docbook"> + <title>The BadFunctionCallException class</title> + <titleabbrev>BadFunctionCallException</titleabbrev> + + <partintro> + +<!-- {{{ BadFunctionCallException intro --> + <section xml:id="badfunctioncallexception.intro"> + &reftitle.intro; + <para> + 一个回调引用的是一个未定义的函数或缺失一些参数时会抛出该异常。 + </para> + </section> +<!-- }}} --> + + <section xml:id="badfunctioncallexception.synopsis"> + &reftitle.classsynopsis; + +<!-- {{{ Synopsis --> + <classsynopsis> + <ooclass><classname>BadFunctionCallException</classname></ooclass> + +<!-- {{{ Exception synopsis --> + <classsynopsisinfo> + <ooclass> + <classname>BadFunctionCallException</classname> + </ooclass> + + <ooclass> + <modifier>extends</modifier> + <classname>LogicException</classname> + </ooclass> + </classsynopsisinfo> +<!-- }}} --> + + <classsynopsisinfo role="comment">&InheritedProperties;</classsynopsisinfo> + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('exception.synopsis')/descendant::db:fieldsynopsis)" /> + +<!-- Comment this section out if the exception does not contain any methods --><!-- + <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo> + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.badfunctioncallexception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> +--> + <classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo> + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.exception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> + </classsynopsis> +<!-- }}} --> + + </section> + + </partintro> + + <!-- If the exception has any methods you'd like to document use this + &reference.extname.entities.classname; + --> + +</phpdoc:exceptionref> + +<!-- 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 +--> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=68210 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=68210 ------------------------------------------------------------------ New file: zh/reference/spl/arrayobject.xml By: Rambone on 2016-09-06 19:15:43 =================================================================== --- zh/reference/spl/arrayobject.xml +++ zh/reference/spl/arrayobject.xml @@ -0,0 +1,172 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: $ --> +<!-- EN-Revision: 330310 Maintainer: Rambone Status: ready --> +<!-- Reviewed: no --> + +<phpdoc:classref xmlns:phpdoc="http://php.net/ns/phpdoc" xml:id="class.arrayobject" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> + <title>The ArrayObject class</title> + <titleabbrev>ArrayObject</titleabbrev> + + <partintro> + +<!-- {{{ ArrayObject intro --> + <section xml:id="arrayobject.intro"> + &reftitle.intro; + <para> + 此类允许对象像数组一样工作。 + </para> + </section> +<!-- }}} --> + + <section xml:id="arrayobject.synopsis"> + &reftitle.classsynopsis; + +<!-- {{{ Synopsis --> + <classsynopsis> + <ooclass><classname>ArrayObject</classname></ooclass> + +<!-- {{{ Class synopsis --> + + <classsynopsisinfo> + <ooclass> + <classname>ArrayObject</classname> + </ooclass> + + <oointerface> + <interfacename>IteratorAggregate</interfacename> + </oointerface> + + <oointerface> + <interfacename>ArrayAccess</interfacename> + </oointerface> + + <oointerface> + <interfacename>Serializable</interfacename> + </oointerface> + + <oointerface> + <interfacename>Countable</interfacename> + </oointerface> + + </classsynopsisinfo> + <classsynopsisinfo role="comment">&Constants;</classsynopsisinfo> + <fieldsynopsis> + <modifier>const</modifier> + <type>integer</type> + <varname linkend="arrayobject.constants.std-prop-list">STD_PROP_LIST</varname> + <initializer>1</initializer> + </fieldsynopsis> + <fieldsynopsis> + <modifier>const</modifier> + <type>integer</type> + <varname linkend="arrayobject.constants.array-as-props">ARRAY_AS_PROPS</varname> + <initializer>2</initializer> + </fieldsynopsis> +<!-- }}} --> + + <!-- {{{ If the property is documented below (xml:id=arrayobject.props) use this + <classsynopsisinfo role="comment">&Properties;</classsynopsisinfo> + <fieldsynopsis> + <modifier>public</modifier> + <type>string</type> + <varname linkend="arrayobject.props.name">name</varname> + </fieldsynopsis> + }}} --> + + <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo> + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.arrayobject')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[1])" /> + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.arrayobject')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> + </classsynopsis> + + </section> + + <section xml:id="arrayobject.constants"> + &reftitle.constants; + <section xml:id="arrayobject.constants.flags"> + <title>ArrayObject Flags</title> + <variablelist> + + <varlistentry xml:id="arrayobject.constants.std-prop-list"> + <term><constant>ArrayObject::STD_PROP_LIST</constant></term> + <listitem> + <para> + 以列表形式(var_dump,foreach等)访问时,对象的属性拥有其常规功能。</para> + </listitem> + </varlistentry> + + <varlistentry xml:id="arrayobject.constants.array-as-props"> + <term><constant>ArrayObject::ARRAY_AS_PROPS</constant></term> + <listitem> + <para>实体可以属性形式被访问(读和写)。</para> + </listitem> + </varlistentry> + </variablelist> + </section> + </section> + + <section role="changelog"> + &reftitle.changelog; + <para> + <informaltable> + <tgroup cols="2"> + <thead> + <row> + <entry>&Version;</entry> + <entry>&Description;</entry> + </row> + </thead> + <tbody> + <row> + <entry>5.3.0</entry> + <entry> + Implements <interfacename>Serializable</interfacename>. + </entry> + </row> + </tbody> + </tgroup> + </informaltable> + </para> + </section> + + +<!-- {{{ ArrayObject properties + <section xml:id="arrayobject.props"> + &reftitle.properties; + <variablelist> + <varlistentry xml:id="arrayobject.props.name"> + <term><varname>name</varname></term> + <listitem> + <para>Prop description</para> + </listitem> + </varlistentry> + </variablelist> + </section> +}}} --> + + </partintro> + + &reference.spl.entities.arrayobject; + +</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:"~/.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 +--> + => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=68223 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=68223 ------------------------------------------------------------------ New file: zh/reference/spl/underflowexception.xml By: Rambone on 2016-09-06 21:11:08 =================================================================== --- zh/reference/spl/underflowexception.xml +++ zh/reference/spl/underflowexception.xml @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: $ --> +<!-- EN-Revision: 330314 Maintainer: Rambone Status: ready --> +<!-- Reviewed: no --> + +<phpdoc:exceptionref xml:id="class.underflowexception" + xmlns:phpdoc="http://php.net/ns/phpdoc" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns:xi="http://www.w3.org/2001/XInclude" + xmlns="http://docbook.org/ns/docbook"> + <title>The UnderflowException class</title> + <titleabbrev>UnderflowException</titleabbrev> + + <partintro> + +<!-- {{{ UnderflowException intro --> + <section xml:id="underflowexception.intro"> + &reftitle.intro; + <para> + Exception thrown when performing an invalid operation on an empty + container, such as removing an element. + 此异常会在空集合上执行非法操作,如移除一个元素时抛出。 + </para> + </section> +<!-- }}} --> + + <section xml:id="underflowexception.synopsis"> + &reftitle.classsynopsis; + +<!-- {{{ Synopsis --> + <classsynopsis> + <ooclass><classname>UnderflowException</classname></ooclass> + +<!-- {{{ Exception synopsis --> + <classsynopsisinfo> + <ooclass> + <classname>UnderflowException</classname> + </ooclass> + + <ooclass> + <modifier>extends</modifier> + <classname>RuntimeException</classname> + </ooclass> + </classsynopsisinfo> +<!-- }}} --> + + <classsynopsisinfo role="comment">&InheritedProperties;</classsynopsisinfo> + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('exception.synopsis')/descendant::db:fieldsynopsis)" /> + +<!-- Comment this section out if the exception does not contain any methods --><!-- + <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo> + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.underflowexception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> +--> + <classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo> + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.exception')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> + </classsynopsis> +<!-- }}} --> + + </section> + + </partintro> + + <!-- If the exception has any methods you'd like to document use this + &reference.extname.entities.classname; + --> + +</phpdoc:exceptionref> + +<!-- 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 +--> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=68224 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=68224 ------------------------------------------------------------------ New file: zh/reference/spl/splsubject.xml By: Rambone on 2016-09-06 21:13:31 =================================================================== --- zh/reference/spl/splsubject.xml +++ zh/reference/spl/splsubject.xml @@ -0,0 +1,70 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: $ --> +<!-- EN-Revision: 317663 Maintainer: Rambone Status: ready --> +<!-- Reviewed: no --> + +<phpdoc:classref xml:id="class.splsubject" 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>The SplSubject interface</title> + <titleabbrev>SplSubject</titleabbrev> + + <partintro> + +<!-- {{{ SplSubject intro --> + <section xml:id="splsubject.intro"> + &reftitle.intro; + <para> + <classname>SplSubject</classname>接口是伴随 + <classname>SplObserver</classname>来实现观察者设计模式的。 + </para> + </section> +<!-- }}} --> + + <section xml:id="splsubject.synopsis"> + &reftitle.interfacesynopsis; + +<!-- {{{ Synopsis --> + <classsynopsis> + <ooclass><classname>SplSubject</classname></ooclass> + +<!-- {{{ Class synopsis --> + <classsynopsisinfo> + <ooclass> + <classname>SplSubject</classname> + </ooclass> + </classsynopsisinfo> +<!-- }}} --> + + <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo> + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.splsubject')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> + </classsynopsis> +<!-- }}} --> + + </section> + + </partintro> + + &reference.spl.entities.splsubject; + +</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:"~/.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 +--> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=68225 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=68225 ------------------------------------------------------------------ New file: zh/reference/spl/splqueue.xml By: Rambone on 2016-09-06 21:19:56 =================================================================== --- zh/reference/spl/splqueue.xml +++ zh/reference/spl/splqueue.xml @@ -0,0 +1,115 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: $ --> +<!-- EN-Revision: 292734 Maintainer: Rambone Status: ready --> +<!-- Reviewed: no --> + +<phpdoc:classref xmlns:phpdoc="http://php.net/ns/phpdoc" xml:id="class.splqueue" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xi="http://www.w3.org/2001/XInclude"> + <title>The SplQueue class</title> + <titleabbrev>SplQueue</titleabbrev> + + <partintro> + +<!-- {{{ splqueue intro --> + <section xml:id="splqueue.intro"> + &reftitle.intro; + <para> + SplStack类通过使用一个双向链表来提供队列的主要功能。 + </para> + </section> +<!-- }}} --> + + <section xml:id="splqueue.synopsis"> + &reftitle.classsynopsis; + +<!-- {{{ Synopsis --> + <classsynopsis> + <ooclass><classname>SplQueue</classname></ooclass> + +<!-- {{{ Class synopsis --> + + <classsynopsisinfo> + <ooclass> + <classname>SplQueue</classname> + </ooclass> + + <ooclass> + <modifier>extends</modifier> + <classname>SplDoublyLinkedList</classname> + </ooclass> + + <oointerface> + <interfacename>Iterator</interfacename> + </oointerface> + + <oointerface> + <interfacename>ArrayAccess</interfacename> + </oointerface> + + <oointerface> + <interfacename>Countable</interfacename> + </oointerface> + + </classsynopsisinfo> +<!-- }}} --> + + <!-- {{{ If the property is documented below (xml:id=splqueue.props) use this + <classsynopsisinfo role="comment">&Properties;</classsynopsisinfo> + <fieldsynopsis> + <modifier>public</modifier> + <type>string</type> + <varname linkend="splqueue.props.name">name</varname> + </fieldsynopsis> + }}} --> + + <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo> + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.splqueue')/db:refentry/db:refsect1[@role='description']/descendant::db:constructorsynopsis[1])" /> + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.splqueue')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> + + <classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo> + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.spldoublylinkedlist')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> + </classsynopsis> + + </section> + + +<!-- {{{ splqueue properties + <section xml:id="splqueue.props"> + &reftitle.properties; + <variablelist> + <varlistentry xml:id="splqueue.props.name"> + <term><varname>name</varname></term> + <listitem> + <para>Prop description</para> + </listitem> + </varlistentry> + </variablelist> + </section> +}}} --> + + </partintro> + + &reference.spl.entities.splqueue; + +</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:"~/.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 +--> + => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=68227 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=68227 ------------------------------------------------------------------ New file: zh/reference/spl/files.xml By: Rambone on 2016-09-06 21:20:29 =================================================================== --- zh/reference/spl/files.xml +++ zh/reference/spl/files.xml @@ -0,0 +1,38 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: $ --> +<!-- EN-Revision: 334762 Maintainer: Rambone Status: ready --> +<!-- Reviewed: no --> + +<part xml:id="spl.files" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + + &spl.files.intro.title; + &spl.files.intro; + + &reference.spl.splfileinfo; + &reference.spl.splfileobject; + &reference.spl.spltempfileobject; + +</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:"~/.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 +--> + => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=68228 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=68228 ------------------------------------------------------------------ New file: zh/reference/spl/exceptions.xml By: Rambone on 2016-09-06 21:21:21 =================================================================== --- zh/reference/spl/exceptions.xml +++ zh/reference/spl/exceptions.xml @@ -0,0 +1,82 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: $ --> +<!-- EN-Revision: 334762 Maintainer: Rambone Status: ready --> +<!-- Reviewed: no --> + +<part xml:id="spl.exceptions" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + + &spl.exceptions.intro.title; + + <partintro> + &spl.exceptions.intro; + + <section xml:id="spl.exceptions.tree"> + <title>SPL异常类</title> + <itemizedlist> + <listitem> + <simpara><classname>LogicException</classname> (extends <classname>Exception</classname>)</simpara> + <itemizedlist> + <listitem> + <simpara><classname>BadFunctionCallException</classname></simpara> + <itemizedlist> + <listitem><simpara><classname>BadMethodCallException</classname></simpara></listitem> + </itemizedlist> + </listitem> + <listitem><simpara><classname>DomainException</classname></simpara></listitem> + <listitem><simpara><classname>InvalidArgumentException</classname></simpara></listitem> + <listitem><simpara><classname>LengthException</classname></simpara></listitem> + <listitem><simpara><classname>OutOfRangeException</classname></simpara></listitem> + </itemizedlist> + </listitem> + <listitem> + <simpara><classname>RuntimeException</classname> (extends <classname>Exception</classname>)</simpara> + <itemizedlist> + <listitem><simpara><classname>OutOfBoundsException</classname></simpara></listitem> + <listitem><simpara><classname>OverflowException</classname></simpara></listitem> + <listitem><simpara><classname>RangeException</classname></simpara></listitem> + <listitem><simpara><classname>UnderflowException</classname></simpara></listitem> + <listitem><simpara><classname>UnexpectedValueException</classname></simpara></listitem> + </itemizedlist> + </listitem> + </itemizedlist> + </section> + + </partintro> + + &reference.spl.badfunctioncallexception; + &reference.spl.badmethodcallexception; + &reference.spl.domainexception; + &reference.spl.invalidargumentexception; + &reference.spl.lengthexception; + &reference.spl.logicexception; + &reference.spl.outofboundsexception; + &reference.spl.outofrangeexception; + &reference.spl.overflowexception; + &reference.spl.rangeexception; + &reference.spl.runtimeexception; + &reference.spl.underflowexception; + &reference.spl.unexpectedvalueexception; + +</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:"~/.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 +--> + => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=68229 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=68229 ------------------------------------------------------------------ New file: zh/reference/spl/emptyiterator.xml By: Rambone on 2016-09-06 21:21:55 =================================================================== --- zh/reference/spl/emptyiterator.xml +++ zh/reference/spl/emptyiterator.xml @@ -0,0 +1,74 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: $ --> +<!-- EN-Revision: 330310 Maintainer: Rambone Status: ready --> +<!-- Reviewed: no --> + +<phpdoc:classref xml:id="class.emptyiterator" 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>The EmptyIterator class</title> + <titleabbrev>EmptyIterator</titleabbrev> + + <partintro> + +<!-- {{{ EmptyIterator intro --> + <section xml:id="emptyiterator.intro"> + &reftitle.intro; + <para> + EmptyIterator类表示空迭代器。 + </para> + </section> +<!-- }}} --> + + <section xml:id="emptyiterator.synopsis"> + &reftitle.classsynopsis; + +<!-- {{{ Synopsis --> + <classsynopsis> + <ooclass><classname>EmptyIterator</classname></ooclass> + +<!-- {{{ Class synopsis --> + <classsynopsisinfo> + <ooclass> + <classname>EmptyIterator</classname> + </ooclass> + + <oointerface> + <interfacename>Iterator</interfacename> + </oointerface> + + </classsynopsisinfo> +<!-- }}} --> + + <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo> + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.emptyiterator')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> + </classsynopsis> +<!-- }}} --> + + </section> + + </partintro> + + &reference.spl.entities.emptyiterator; + +</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:"~/.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 +--> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=68230 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=68230 ------------------------------------------------------------------ New file: zh/reference/pdf/functions/pdf-load-image.xml By: shanmin on 2016-12-01 21:45:56 =================================================================== => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=70661 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=70661 ------------------------------------------------------------------ New file: zh/reference/pdf/functions/pdf-end-document.xml By: shanmin on 2016-12-01 21:54:47 =================================================================== => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=70663 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=70663 ------------------------------------------------------------------ New file: zh/reference/mongo/mongo.xml By: 陈佳 on 2017-11-02 06:53:40 =================================================================== --- zh/reference/mongo/mongo.xml +++ zh/reference/mongo/mongo.xml @@ -0,0 +1,91 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: $ --> +<!-- EN-Revision: 328426 Maintainer: 陈佳 Status: ready --> +<!-- Reviewed: no --> + +<phpdoc:classref xml:id="class.mongo" 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>The Mongo class [deprecated]</title> + <titleabbrev>Mongo</titleabbrev> + + <partintro> + <!-- {{{ Mongo intro --> + <section xml:id="mongo.intro"> + &reftitle.intro; + <para> + PHP 和 MongoDB 之间的连接库。 + </para> + <para> + 这里类继承<classname>MongoClient</classname> 并提供访问几个废弃的方法。 + </para> + <para> + 为了向后兼容, 它还将其构造函数参数的<literal>"w"</literal>选项默认为<literal>0</literal>, 这不要求服务器承认写操作。有关详细信息, 请参见 + <function>MongoClient::__construct</function> + </para> + + <warning xmlns="http://docbook.org/ns/docbook"> + <simpara> + 这个类在1.3.0版本被<emphasis>废弃</emphasis>,靠这个功能是非常不鼓励的,请使用 + <classname>MongoClient</classname>。 + </simpara> + </warning> + </section> + <!-- }}} --> + + <section xml:id="mongo.synopsis"> + &reftitle.classsynopsis; + + <!-- {{{ Synopsis --> + <classsynopsis> + <ooclass><classname>Mongo</classname></ooclass> + + <!-- {{{ Class synopsis --> + <classsynopsisinfo> + <ooclass> + <classname>Mongo</classname> + </ooclass> + + <ooclass> + <modifier>extends</modifier> + <classname>MongoClient</classname> + </ooclass> + </classsynopsisinfo> + <!-- }}} --> + + <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo> + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongo')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> + + <classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo> + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.mongoclient')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> + </classsynopsis> + <!-- }}} --> + + </section> + +<!-- }}} --> + </partintro> + + &reference.mongo.entities.mongo; + +</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:"~/.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 +--> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=76073 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=76073 ------------------------------------------------------------------ New file: zh/appendices/migration72/new-features.xml By: kumfo on 2017-11-03 23:44:48 =================================================================== --- zh/appendices/migration72/new-features.xml +++ zh/appendices/migration72/new-features.xml @@ -0,0 +1,304 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: $ --> +<!-- EN-Revision: 343247 Maintainer: kumfo Status: ready --> +<!-- Reviewed: no --> + +<sect1 xml:id="migration72.new-features" xmlns:xlink="http://www.w3.org/1999/xlink"> + <title>新特性</title> + + <sect2 xml:id="migration72.new-features.object-type"> + <title>新的对象类型</title> + + <para> + 这种新的对象类型, <type>object</type>, 引进了可用于逆变(contravariant)参数输入和协变(covariant)返回任何对象类型。 + </para> + + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php + +function test(object $obj) : object +{ + return new SplQueue(); +} + +test(new StdClass()); +]]> + </programlisting> + </informalexample> + </sect2> + + <sect2 xml:id="migration72.new-features.ext-loading-by-name"> + <title>通过名称加载扩展</title> + + <para> + 扩展文件不再需要通过文件加载 + (Unix下以<literal>.so</literal>为文件扩展名,在Windows下以 <literal>.dll</literal> 为文件扩展名) 进行指定。可以在php.ini配置文件进行启用, 也可以使用 + <function>dl</function> 函数进行启用。 + </para> + </sect2> + + <sect2 xml:id="migration72.new-features.abstract-method-overriding"> + <title>允许重写抽象方法(Abstract method)</title> + + <para> + 当一个抽象类继承于另外一个抽象类的时候,继承后的抽象类可以重写被继承的抽象类的抽象方法。 + </para> + + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php + +abstract class A +{ + abstract function test(string $s); +} +abstract class B extends A +{ + // overridden - still maintaining contravariance for parameters and covariance for return + abstract function test($s) : int; +} +]]> + </programlisting> + </informalexample> + </sect2> + + <sect2 xml:id="migration72.new-features.pws-hashing-with-argon2"> + <title>使用Argon2算法生成密码散列</title> + + <para> + Argon2 已经被加入到密码散列(password hashing) API (这些函数以 + <literal>password_</literal> 开头), 以下是暴露出来的常量: + </para> + + <itemizedlist> + <listitem> + <simpara> + <constant>PASSWORD_ARGON2I</constant> + </simpara> + </listitem> + <listitem> + <simpara> + <constant>PASSWORD_ARGON2_DEFAULT_MEMORY_COST</constant> + </simpara> + </listitem> + <listitem> + <simpara> + <constant>PASSWORD_ARGON2_DEFAULT_TIME_COST</constant> + </simpara> + </listitem> + <listitem> + <simpara> + <constant>PASSWORD_ARGON2_DEFAULT_THREADS</constant> + </simpara> + </listitem> + </itemizedlist> + </sect2> + + <sect2 xml:id="migration72.new-features.pdo-extended-str-types"> + <title>新增 ext/PDO(PDO扩展) 字符串扩展类型</title> + + <para> + 当你准备支持多语言字符集,PDO的字符串类型已经扩展支持国际化的字符集。以下是扩展的常量: + </para> + + <itemizedlist> + <listitem> + <simpara> + <constant>PDO::PARAM_STR_NATL</constant> + </simpara> + </listitem> + <listitem> + <simpara> + <constant>PDO::PARAM_STR_CHAR</constant> + </simpara> + </listitem> + <listitem> + <simpara> + <constant>PDO::ATTR_DEFAULT_STR_PARAM</constant> + </simpara> + </listitem> + </itemizedlist> + + <para> + 这些常量通过<constant>PDO::PARAM_STR</constant>利用位运算<literal>OR</literal>进行计算: + </para> + + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php + +$db->quote('über', PDO::PARAM_STR | PDO::PARAM_STR_NATL); +]]> + </programlisting> + </informalexample> + </sect2> + + <sect2 xml:id="migration72.new-features.additional-emulated-prepares-debugging-info"> + <title>为 ext/PDO新增额外的模拟调试信息</title> + + <para> + <function>PDOStatement::debugDumpParams</function>方法已经更新,当发送SQL到数据库的时候,在一致性、行查询(包括替换绑定占位符)将会显示调试信息。这一特性已经加入到模拟调试中(在模拟调试打开时可用)。 + </para> + </sect2> + + <sect2 xml:id="migration72.new-features.extended-ops-in-ldap"> + <title>ext/LDAP(LDAP扩展) 支持新的操作方式</title> + + <para> + LDAP 扩展已经新增了EXOP支持. 扩展暴露以下函数和常量: + </para> + + <itemizedlist> + <listitem> + <simpara> + <function>ldap_parse_exop</function> + </simpara> + </listitem> + <listitem> + <simpara> + <function>ldap_exop</function> + </simpara> + </listitem> + <listitem> + <simpara> + <function>ldap_exop_passwd</function> + </simpara> + </listitem> + <listitem> + <simpara> + <function>ldap_exop_whoami</function> + </simpara> + </listitem> + <listitem> + <simpara> + <constant>LDAP_EXOP_START_TLS</constant> + </simpara> + </listitem> + <listitem> + <simpara> + <constant>LDAP_EXOP_MODIFY_PASSWD</constant> + </simpara> + </listitem> + <listitem> + <simpara> + <constant>LDAP_EXOP_REFRESH</constant> + </simpara> + </listitem> + <listitem> + <simpara> + <constant>LDAP_EXOP_WHO_AM_I</constant> + </simpara> + </listitem> + <listitem> + <simpara> + <constant>LDAP_EXOP_TURN</constant> + </simpara> + </listitem> + </itemizedlist> + </sect2> + + <sect2 xml:id="migration72.new-features.addr-info-in-sockets"> + <title>ext/sockets(sockets扩展)添加了地址信息</title> + + <para> + sockets扩展现在具有查找地址信息的能力,且可以连接到这个地址,或者进行绑定和解析。为此添加了以下一些函数: + </para> + + <itemizedlist> + <listitem> + <simpara> + <function>socket_addrinfo_lookup</function> + </simpara> + </listitem> + <listitem> + <simpara> + <function>socket_addrinfo_connect</function> + </simpara> + </listitem> + <listitem> + <simpara> + <function>socket_addrinfo_bind</function> + </simpara> + </listitem> + <listitem> + <simpara> + <function>socket_addrinfo_explain</function> + </simpara> + </listitem> + </itemizedlist> + </sect2> + + <sect2 xml:id="migration72.new-features.param-type-widening"> + <title>扩展了参数类型</title> + + <para> + 重写方法和接口实现的参数类型现在可以省略了。不过这仍然是符合LSP,因为现在这种参数类型是逆变的。 + </para> + + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php + +interface A +{ + public function Test(array $input); +} + +class B implements A +{ + public function Test($input){} // type omitted for $input +} +]]> + </programlisting> + </informalexample> + </sect2> + + <sect2 xml:id="migration72.new-features.trailing-comma-in-grouped-namespaces"> + <title>允许分组命名空间的尾部逗号</title> + + <para> + 命名空间可以在PHP 7中使用尾随逗号进行分组引入。 + </para> + + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php + +use FooBar{ + Foo, + Bar, + Baz, +}; +]]> + </programlisting> + </informalexample> + </sect2> + +</sect1> + +<!-- 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 +--> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=76114 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=76114 ------------------------------------------------------------------ Modified: zh/reference/sqlsrv/functions/sqlsrv-connect.xml By: anonymous on 2015-04-25 12:02:22 =================================================================== --- zh/reference/sqlsrv/functions/sqlsrv-connect.xml +++ zh/reference/sqlsrv/functions/sqlsrv-connect.xml @@ -0,0 +1,189 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 317663 $ --> +<refentry xml:id="function.sqlsrv-connect" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + <refnamediv> + <refname>sqlsrv_connect</refname> + <refpurpose>原文:sqlsrv_connect — Opens a connection to a Microsoft SQL Server database. + 参考译文:sqlsrv_connect() —— 打开到Microsoft SQL Server数据库的连接。</refpurpose> + </refnamediv> + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>resource</type><methodname>sqlsrv_connect</methodname> + <methodparam><type>string</type><parameter>serverName</parameter></methodparam> + <methodparam choice="opt"><type>array</type><parameter>connectionInfo</parameter></methodparam> + </methodsynopsis> + <para> + 原文:Opens a connection to a Microsoft SQL Server database. By default, the connection + is attempted using Windows Authentication. To connect using SQL Server + Authentication, include "UID" and "PWD" in the connection options array. + 参考译文:打开到Microsoft SQL Server数据库的连接。默认使用Windows系统管理员身份尝试连接。 +   如果需要使用SQL Server的身份进行连接,则需要定义一个包含“UID”(MSSQL用户)和“PWD” + (MSSQL用户密码)的数组做为参数来进行连接。 + </para> + </refsect1> + + <refsect1 role="parameters"> + &reftitle.parameters; + <para> + <variablelist> + <varlistentry> + <term><parameter>serverName</parameter></term> + <listitem> + <para> + 原文:The name of the server to which a connection is established. To connect + to a specific instance, follow the server name with a forward slash + and the instance name (e.g. serverNamesqlexpress). + 参考译文:需要建立连接的MSSQL数据库。 + 连接到一个特定的实例,请使用“服务器名称实例名称”的格式(例如: serverNameSQLEXPRESS ,注意中间是以反斜杠进行连接的)。 + 个人补充:本地也可以使用(Local)进行连接,注意完整的是"(Local)"哦,包括括号。 + </para> + </listitem> + </varlistentry> + <varlistentry> + <term><parameter>connectionInfo</parameter></term> + <listitem> + <para> + 原文:An associative array that specifies options for connecting to the server. + If values for the UID and PWD keys are not specified, the connection + will be attempted using Windows Authentication. For a complete list of supported + keys, see <link xlink:href="&url.sqlsrv.connection.options;">SQLSRV Connection Options</link>. + 参考译文:存放连接数据库关联信息的数组。如果数组的键值(key)为uid和pwd的值为空的话,则将尝试使用Windows身份验证进行连接。 + 关于完整的数组键值的列表,请点击链接<link xlink:href="&url.sqlsrv.connection.options;">»sqlsrv连接选项</link>进行查阅。 + </para> + </listitem> + </varlistentry> + </variablelist> + </para> + </refsect1> + + <refsect1 role="returnvalues"> + &reftitle.returnvalues; + <para> + 原文:A connection resource. If a connection cannot be successfully opened, &false; is returned. + 参考译文:如果成功则返回一个 MSSQL 连接标识, 或者在失败时返回 FALSE。 + </para> + </refsect1> + + <refsect1 role="examples"> + &reftitle.examples; + <para> + <example> + <title>Connect using Windows Authentication.使用Windows用户身份进行连接。</title> + <programlisting role="php"> +<![CDATA[ +<?php +$serverName = "serverNamesqlexpress"; //serverNameinstanceName 数据库用户名实例名称 + +// Since UID and PWD are not specified in the $connectionInfo array, +// The connection will be attempted using Windows Authentication. +// 因为数组中没定义名为 UID 和 PWD 的键和对应的值,所以默认使用Windows用户身份进行验证并连接。 +$connectionInfo = array( "Database"=>"dbName"); +$conn = sqlsrv_connect( $serverName, $connectionInfo); + +if( $conn ) { + echo "成功创建连接。<br />"; +}else{ + echo "创建连接失败。<br />"; + die( print_r( sqlsrv_errors(), true)); +} +?> +]]> + </programlisting> + </example> + </para> + <para> + <example> + <title>Connect by specifying a user name and password.使用MSSQL用户名密码进行连接。</title> + <programlisting role="php"> +<![CDATA[ +<?php +$serverName = "serverNamesqlexpress"; //serverNameinstanceName +$connectionInfo = array( "Database"=>"dbName", "UID"=>"userName", "PWD"=>"password"); +$conn = sqlsrv_connect( $serverName, $connectionInfo); + +if( $conn ) { + echo "Connection established.<br />"; +}else{ + echo "Connection could not be established.<br />"; + die( print_r( sqlsrv_errors(), true)); +} +?> +]]> + </programlisting> + </example> + </para> + <para> + <example> + <title>Connect on a specifed port.使用指定端口进行连接。</title> + <programlisting role="php"> +<![CDATA[ +<?php +$serverName = "serverNamesqlexpress, 1542"; //serverNameinstanceName, portNumber (default is 1433) +// 默认端口号是1433,这里使用的是1542。 +$connectionInfo = array( "Database"=>"dbName", "UID"=>"userName", "PWD"=>"password"); +$conn = sqlsrv_connect( $serverName, $connectionInfo); + +if( $conn ) { + echo "Connection established.<br />"; +}else{ + echo "Connection could not be established.<br />"; + die( print_r( sqlsrv_errors(), true)); +} +?> +]]> + </programlisting> + </example> + </para> + </refsect1> + + <refsect1 role="notes"> + &reftitle.notes; + <para> + By default, the <function>sqlsrv_connect</function> uses connection pooling to + improve connection performance. To turn off connection pooling (i.e. force a + new connection on each call), set the "ConnectionPooling" option in the + $connectionOptions array to 0 (or &false;). For more information, see + <link xlink:href="&url.sqlsrv.connection.pooling;">SQLSRV Connection Pooling</link>. + </para> + <para> + The SQLSRV extension does not have a dedicated function for changing which + database is connected to. The target database is specified in the + $connectionOptions array that is passed to sqlsrv_connect. To change the + database on an open connection, execute the following query "USE dbName" + (e.g. sqlsrv_query($conn, "USE dbName")). + </para> + </refsect1> + + <refsect1 role="seealso"> + &reftitle.seealso; + <para> + <simplelist> + <member><function>sqlsrv_close</function></member> + <member><function>sqlsrv_errors</function></member> + <member><function>sqlsrv_query</function></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 +--> No newline at end of file => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=62385 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=62385 ------------------------------------------------------------------ Modified: zh/reference/yaf/appconfig.xml By: anonymous on 2016-02-20 20:06:17 =================================================================== --- zh/reference/yaf/appconfig.xml +++ zh/reference/yaf/appconfig.xml @@ -1,390 +1,390 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 334960 $ --> -<!-- EN-Revision: 329592 Maintainer: Carbyn Wu Status: ready --> -<!-- Reviewed: no --> - -<chapter xml:id="yaf.appconfig" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> - <title xmlns="http://docbook.org/ns/docbook">应用配置</title> - <para> - 你需要传递一个config数组或ini配置文件(参见 - <classname>Yaf_Config_Ini</classname>) 给 - <methodname>Yaf_Application::__construct</methodname>. - </para> - <para> - Yaf的配置文件会和用户的配置文件合并。区别在于,Yaf的配置文件是以"yaf."或"application."开头,如果两项都存在,则"application."生效。 - <example> - <title>config为数组的例子</title> - <programlisting role="php"> -<![CDATA[ -<?php - $configs = array( - "application" => array( - "directory" => dirname(__FILE__), - "dispatcher" => array( - "catchException" => 0, - ), - "view" => array( - "ext" => "phtml", - ), - ), - ); - $app = new Yaf_Application($config); -?> -]]> - </programlisting> - </example> - <example> - <title>config为ini文件的例子</title> - <programlisting role="ini"> -<![CDATA[ -[yaf] -yaf.directory = APPLICATION_PATH "/appliation" -yaf.dispatcher.catchException = 0 - -[product : yaf] -; user configuration list here -]]> - </programlisting> - </example> - </para> - <para> - <table> - <title>Yaf Application Config</title> - <tgroup cols="3"> - <thead> - <row> - <entry>&Name;</entry> - <entry>&Default;</entry> - <entry>&Changelog;</entry> - </row> - </thead> - <tbody> - <row> - <entry>application.directory</entry> - <entry></entry> - <entry><!-- leave empty, this will be filled by an automatic script --></entry> - </row> - <row> - <entry>application.ext</entry> - <entry>"php"</entry> - <entry><!-- leave empty, this will be filled by an automatic script --></entry> - </row> - <row> - <entry>application.view.ext</entry> - <entry>"phtml"</entry> - <entry><!-- leave empty, this will be filled by an automatic script --></entry> - </row> - <row> - <entry>application.modules</entry> - <entry>"index"</entry> - <entry><!-- leave empty, this will be filled by an automatic script --></entry> - </row> - <row> - <entry>application.library</entry> - <entry>application.directory . "/library"</entry> - <entry><!-- leave empty, this will be filled by an automatic script --></entry> - </row> - <row> - <entry>application.library.directory</entry> - <entry>application.directory . "/library"</entry> - <entry><!-- leave empty, this will be filled by an automatic script --></entry> - </row> - <row> - <entry>application.library.namespace</entry> - <entry>""</entry> - <entry><!-- leave empty, this will be filled by an automatic script --></entry> - </row> - <row> - <entry>application.bootstrap</entry> - <entry>application.directory . "/Bootstrap" . application.ext</entry> - <entry><!-- leave empty, this will be filled by an automatic script --></entry> - </row> - <row> - <entry>application.baseUri</entry> - <entry>""</entry> - <entry><!-- leave empty, this will be filled by an automatic script --></entry> - </row> - <row> - <entry>application.dispatcher.defaultRoute</entry> - <entry></entry> - <entry><!-- leave empty, this will be filled by an automatic script --></entry> - </row> - <row> - <entry>application.dispatcher.throwException</entry> - <entry>1</entry> - <entry><!-- leave empty, this will be filled by an automatic script --></entry> - </row> - <row> - <entry>application.dispatcher.catchException</entry> - <entry>0</entry> - <entry><!-- leave empty, this will be filled by an automatic script --></entry> - </row> - <row> - <entry>application.dispatcher.defaultModule</entry> - <entry>"index"</entry> - <entry><!-- leave empty, this will be filled by an automatic script --></entry> - </row> - <row> - <entry>application.dispatcher.defaultController</entry> - <entry>"index"</entry> - <entry><!-- leave empty, this will be filled by an automatic script --></entry> - </row> - <row> - <entry>application.dispatcher.defaultAction</entry> - <entry>"index"</entry> - <entry><!-- leave empty, this will be filled by an automatic script --></entry> - </row> - <row> - <entry>application.system</entry> - <entry></entry> - <entry><!-- leave empty, this will be filled by an automatic script --></entry> - </row> - </tbody> - </tgroup> - </table> - </para> - - &ini.descriptions.title; - - <para> - <variablelist> - <varlistentry xml:id="configuration.yaf.directory"> - <term> - <parameter>application.directory</parameter> - <type>string</type> - </term> - <listitem> - <para> - 应用程序的目录,包含"controllers", "views", "models", "plugins"等子目录。 - </para> - <para> - <note> - <para> - 这是唯一一个没有默认值的配置项,你需要手动指定它。 - </para> - </note> - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="configuration.yaf.ext"> - <term> - <parameter>application.ext</parameter> - <type>string</type> - </term> - <listitem> - <para> - PHP脚本的扩展名,类的自动加载需要用到它( - <classname>Yaf_Loader</classname>)。 - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="configuration.yaf.view.ext"> - <term> - <parameter>application.view.ext</parameter> - <type>string</type> - </term> - <listitem> - <para> - 视图模板扩展名。 - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="configuration.yaf.modules"> - <term> - <parameter>application.modules</parameter> - <type>string</type> - </term> - <listitem> - <para> - 注册的模块列表,以逗号分隔,用于路由处理,特别是当PATH_INFO超过三段的时候, - </para> - <para> - Yaf需要用它来判断第一段是否是一个模块。 - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="configuration.yaf.library"> - <term> - <parameter>application.library</parameter> - <type>string</type> - </term> - <listitem> - <para> - 本地类库的目录,参见<classname>Yaf_Loader</classname> 和 - <link linkend="ini.yaf.library">yaf.library</link>。 - </para> - <note> - <para> - Yaf2.1.6以后,该配置项也可以是一个数组,当它是数组的时候,类库的路径将尝试使用<link - linkend="configuration.yaf.library.directory">application.library.directory</link>的值。 - </para> - </note> - </listitem> - </varlistentry> - <varlistentry xml:id="configuration.yaf.library.directory"> - <term> - <parameter>application.library.directory</parameter> - <type>string</type> - </term> - <listitem> - <para> - Alias of <link - linkend="configuration.yaf.library">application.library</link>. Introduced - in Yaf 2.1.6 - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="configuration.yaf.library.namespace"> - <term> - <parameter>application.library.namespace</parameter> - <type>string</type> - </term> - <listitem> - <para> - 逗号分隔的本地类库命名空间前缀。 - </para> - <para> - Yaf2.1.6以后加入 - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="configuration.yaf.bootstrap"> - <term> - <parameter>application.bootstrap</parameter> - <type>string</type> - </term> - <listitem> - <para> - Bootstrap类脚本文件的绝对路径。 - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="configuration.yaf.baseuri"> - <term> - <parameter>application.baseUri</parameter> - <type>string</type> - </term> - <listitem> - <para> - 路由处理中需要忽略的路径前缀。举个例子,请求"/prefix/controller/action"时。如果你将application.baseUri设置为"/prefix",那么只有"/controller/action"会被当做路由路径。 - </para> - <para> - 通常不需要设置此值。 - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="configuration.yaf.dispatcher.throwexception"> - <term> - <parameter>application.dispatcher.throwException</parameter> - <type>bool</type> - </term> - <listitem> - <para> - 开启此项,Yaf会在发生错误的地方抛出异常。参见 - <methodname>Yaf_Dispatcher::throwException</methodname>。 - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="configuration.yaf.dispatcher.catchexception"> - <term> - <parameter>application.dispatcher.catchException</parameter> - <type>bool</type> - </term> - <listitem> - <para> - 开启此项,如果有未捕获的异常,Yaf将会把它定向到Error controller, Error Action。参见 - <methodname>Yaf_Dispatcher::catchException</methodname>。 - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="configuration.yaf.dispatcher.defaulRoute"> - <term> - <parameter>application.dispatcher.defaultRoute</parameter> - <type>string</type> - </term> - <listitem> - <para> - 默认路由,如果未指定,静态路由会被当做是默认路由,参见: - <methodname>Yaf_Router::addRoute</methodname>。 - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="configuration.yaf.dispatcher.defaultmodule"> - <term> - <parameter>application.dispatcher.defaultModule</parameter> - <type>string</type> - </term> - <listitem> - <para> - 默认模块名,参见 - <methodname>Yaf_Dispatcher::setDefaultModule</methodname>。 - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="configuration.yaf.dispatcher.defaultcontroller"> - <term> - <parameter>application.dispatcher.defaultController</parameter> - <type>string</type> - </term> - <listitem> - <para> - 默认控制器名,参见 - <methodname>Yaf_Dispatcher::setDefaultController</methodname>。 - </para> - </listitem> - </varlistentry> - <varlistentry xml:id="configuration.yaf.dispatcher.defaultaction"> - <term> - <parameter>application.dispatcher.defaultAction</parameter> - <type>string</type> - </term> - <listitem> - <para> - 默认动作名,参见 - <methodname>Yaf_Dispatcher::setDefaultAction</methodname>。 - </para> - </listitem> - </varlistentry> - - <varlistentry xml:id="configuration.yaf.system"> - <term> - <parameter>application.system</parameter> - <type>string</type> - </term> - <listitem> - <para> - 在application.ini中设置Yaf运行时配置,如: - <link linkend="ini.yaf.lowcase-path">application.system.lowcase_path</link> - <note> - <para> - 仅有PHP_INI_ALL配置项能这样设置 - </para> - </note> - </para> - </listitem> - </varlistentry> - - </variablelist> - </para> -</chapter> - -<!-- 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 ---> +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 334960 $ --> +<!-- EN-Revision: 329592 Maintainer: Carbyn Wu Status: ready --> +<!-- Reviewed: no --> + +<chapter xml:id="yaf.appconfig" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink"> + <title xmlns="http://docbook.org/ns/docbook">应用配置</title> + <para> + 你需要传递一个config数组或ini配置文件(参见 + <classname>Yaf_Config_Ini</classname>) 给 + <methodname>Yaf_Application::__construct</methodname>. + </para> + <para> + Yaf的配置文件会和用户的配置文件合并。区别在于,Yaf的配置文件是以"yaf."或"application."开头,如果两项都存在,则"application."生效。 + <example> + <title>config为数组的例子</title> + <programlisting role="php"> +<![CDATA[ +<?php + $configs = array( + "application" => array( + "directory" => dirname(__FILE__), + "dispatcher" => array( + "catchException" => 0, + ), + "view" => array( + "ext" => "phtml", + ), + ), + ); + $app = new Yaf_Application($config); +?> +]]> + </programlisting> + </example> + <example> + <title>config为ini文件的例子</title> + <programlisting role="ini"> +<![CDATA[ +[yaf] +yaf.directory = APPLICATION_PATH "/appliation" +yaf.dispatcher.catchException = 0 + +[product : yaf] +; user configuration list here +]]> + </programlisting> + </example> + </para> + <para> + <table> + <title>Yaf Application Config</title> + <tgroup cols="3"> + <thead> + <row> + <entry>&Name;</entry> + <entry>&Default;</entry> + <entry>&Changelog;</entry> + </row> + </thead> + <tbody> + <row> + <entry>application.directory</entry> + <entry></entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> + <entry>application.ext</entry> + <entry>"php"</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> + <entry>application.view.ext</entry> + <entry>"phtml"</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> + <entry>application.modules</entry> + <entry>"index"</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> + <entry>application.library</entry> + <entry>application.directory . "/library"</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> + <entry>application.library.directory</entry> + <entry>application.directory . "/library"</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> + <entry>application.library.namespace</entry> + <entry>""</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> + <entry>application.bootstrap</entry> + <entry>application.directory . "/Bootstrap" . application.ext</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> + <entry>application.baseUri</entry> + <entry>""</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> + <entry>application.dispatcher.defaultRoute</entry> + <entry></entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> + <entry>application.dispatcher.throwException</entry> + <entry>1</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> + <entry>application.dispatcher.catchException</entry> + <entry>0</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> + <entry>application.dispatcher.defaultModule</entry> + <entry>"index"</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> + <entry>application.dispatcher.defaultController</entry> + <entry>"index"</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> + <entry>application.dispatcher.defaultAction</entry> + <entry>"index"</entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + <row> + <entry>application.system</entry> + <entry></entry> + <entry><!-- leave empty, this will be filled by an automatic script --></entry> + </row> + </tbody> + </tgroup> + </table> + </para> + + &ini.descriptions.title; + + <para> + <variablelist> + <varlistentry xml:id="configuration.yaf.directory"> + <term> + <parameter>application.directory</parameter> + <type>string</type> + </term> + <listitem> + <para> + 应用程序的目录,包含"controllers", "views", "models", "plugins"等子目录。 + </para> + <para> + <note> + <para> + 这是唯一一个没有默认值的配置项,你需要手动指定它。 + </para> + </note> + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="configuration.yaf.ext"> + <term> + <parameter>application.ext</parameter> + <type>string</type> + </term> + <listitem> + <para> + PHP脚本的扩展名,类的自动加载需要用到它( + <classname>Yaf_Loader</classname>)。 + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="configuration.yaf.view.ext"> + <term> + <parameter>application.view.ext</parameter> + <type>string</type> + </term> + <listitem> + <para> + 视图模板扩展名。 + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="configuration.yaf.modules"> + <term> + <parameter>application.modules</parameter> + <type>string</type> + </term> + <listitem> + <para> + 注册的模块列表,以逗号分隔(在模块名称之间有且仅能是以一个逗号分隔,否则除开头的Index模块能够加载外,后续模块加载不了),用于路由处理,特别是当PATH_INFO超过三段的时候, + </para> + <para> + Yaf需要用它来判断第一段是否是一个模块。 + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="configuration.yaf.library"> + <term> + <parameter>application.library</parameter> + <type>string</type> + </term> + <listitem> + <para> + 本地类库的目录,参见<classname>Yaf_Loader</classname> 和 + <link linkend="ini.yaf.library">yaf.library</link>。 + </para> + <note> + <para> + Yaf2.1.6以后,该配置项也可以是一个数组,当它是数组的时候,类库的路径将尝试使用<link + linkend="configuration.yaf.library.directory">application.library.directory</link>的值。 + </para> + </note> + </listitem> + </varlistentry> + <varlistentry xml:id="configuration.yaf.library.directory"> + <term> + <parameter>application.library.directory</parameter> + <type>string</type> + </term> + <listitem> + <para> + Alias of <link + linkend="configuration.yaf.library">application.library</link>. Introduced + in Yaf 2.1.6 + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="configuration.yaf.library.namespace"> + <term> + <parameter>application.library.namespace</parameter> + <type>string</type> + </term> + <listitem> + <para> + 逗号分隔的本地类库命名空间前缀。 + </para> + <para> + Yaf2.1.6以后加入 + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="configuration.yaf.bootstrap"> + <term> + <parameter>application.bootstrap</parameter> + <type>string</type> + </term> + <listitem> + <para> + Bootstrap类脚本文件的绝对路径。 + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="configuration.yaf.baseuri"> + <term> + <parameter>application.baseUri</parameter> + <type>string</type> + </term> + <listitem> + <para> + 路由处理中需要忽略的路径前缀。举个例子,请求"/prefix/controller/action"时。如果你将application.baseUri设置为"/prefix",那么只有"/controller/action"会被当做路由路径。 + </para> + <para> + 通常不需要设置此值。 + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="configuration.yaf.dispatcher.throwexception"> + <term> + <parameter>application.dispatcher.throwException</parameter> + <type>bool</type> + </term> + <listitem> + <para> + 开启此项,Yaf会在发生错误的地方抛出异常。参见 + <methodname>Yaf_Dispatcher::throwException</methodname>。 + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="configuration.yaf.dispatcher.catchexception"> + <term> + <parameter>application.dispatcher.catchException</parameter> + <type>bool</type> + </term> + <listitem> + <para> + 开启此项,如果有未捕获的异常,Yaf将会把它定向到Error controller, Error Action。参见 + <methodname>Yaf_Dispatcher::catchException</methodname>。 + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="configuration.yaf.dispatcher.defaulRoute"> + <term> + <parameter>application.dispatcher.defaultRoute</parameter> + <type>string</type> + </term> + <listitem> + <para> + 默认路由,如果未指定,静态路由会被当做是默认路由,参见: + <methodname>Yaf_Router::addRoute</methodname>。 + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="configuration.yaf.dispatcher.defaultmodule"> + <term> + <parameter>application.dispatcher.defaultModule</parameter> + <type>string</type> + </term> + <listitem> + <para> + 默认模块名,参见 + <methodname>Yaf_Dispatcher::setDefaultModule</methodname>。 + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="configuration.yaf.dispatcher.defaultcontroller"> + <term> + <parameter>application.dispatcher.defaultController</parameter> + <type>string</type> + </term> + <listitem> + <para> + 默认控制器名,参见 + <methodname>Yaf_Dispatcher::setDefaultController</methodname>。 + </para> + </listitem> + </varlistentry> + <varlistentry xml:id="configuration.yaf.dispatcher.defaultaction"> + <term> + <parameter>application.dispatcher.defaultAction</parameter> + <type>string</type> + </term> + <listitem> + <para> + 默认动作名,参见 + <methodname>Yaf_Dispatcher::setDefaultAction</methodname>。 + </para> + </listitem> + </varlistentry> + + <varlistentry xml:id="configuration.yaf.system"> + <term> + <parameter>application.system</parameter> + <type>string</type> + </term> + <listitem> + <para> + 在application.ini中设置Yaf运行时配置,如: + <link linkend="ini.yaf.lowcase-path">application.system.lowcase_path</link> + <note> + <para> + 仅有PHP_INI_ALL配置项能这样设置 + </para> + </note> + </para> + </listitem> + </varlistentry> + + </variablelist> + </para> +</chapter> + +<!-- 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 +--> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=66269 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=66269 ------------------------------------------------------------------ Modified: zh/extensions.ent By: 徐骁 on 2017-09-28 00:27:24 =================================================================== --- zh/extensions.ent +++ zh/extensions.ent @@ -1,6 +1,8 @@ <?xml version="1.0" encoding="utf-8"?> <!-- $Revision: 342050 $ --> <!-- EN-Revision: 331319 Maintainer: dallas Status: ready --> +<!-- Reviewed: no Maintainer: 徐骁 --> +<!-- Reviewed: no Maintainer: 徐骁 --> <!-- Entities for the categorized extension list, so it does not need to be translated, and thus it is not going to be outdated. => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=75691 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=75691 ------------------------------------------------------------------ Modified: zh/appendices/migration71/incompatible.xml By: YisonZhao on 2017-10-16 17:16:52 =================================================================== --- zh/appendices/migration71/incompatible.xml +++ zh/appendices/migration71/incompatible.xml @@ -166,12 +166,42 @@ </sect2> <sect2 xml:id="migration71.incompatible.delete-control-character-in-identifiers"> - <title>Disallow the ASCII delete control character in identifiers</title> + <title>删除控制符(ASCII 127)不能再用于标识符中</title> <para> - The ASCII delete control character (<literal>0x7F</literal>) can no longer - be used in identifiers that are not quoted. + ASCII中的删除控制符(<literal>0x7F</literal>,即<literal>127</literal>)不能再用于标识符中。 </para> + <informalexample> + <programlisting role="php"> +<![CDATA[ +<?php +$deleteChar = chr(127); +$content = <<<EOF +<?php +$var{$deleteChar}name = 123; +echo $var; +EOF; + +file_put_contents('incorrectDemo.php', $content); + +// 然后执行生成的incorrectDemo.php +]]> + </programlisting> + &example.outputs.7; + <screen> +<![CDATA[ +123 +]]> + </screen> + &example.outputs.71; + <screen> +<![CDATA[ +Warning: Unexpected character in input: '' (ASCII=127) state=0 in %s on line %d + +PHP Parse error: syntax error, unexpected 'name' (T_STRING) in %s on line %d +]]> + </screen> + </informalexample> </sect2> <sect2 xml:id="migration71.incompatible.error_log-syslog"> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=75880 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=75880 ------------------------------------------------------------------ Modified: zh/reference/yaf/yaf-route-regex.xml By: anonymous on 2017-10-16 19:24:15 =================================================================== --- zh/reference/yaf/yaf-route-regex.xml +++ zh/reference/yaf/yaf-route-regex.xml @@ -1,132 +1,132 @@ -<?xml version="1.0" encoding="utf-8"?> -<!-- $Revision: 334960 $ --> - -<phpdoc:classref xml:id="class.yaf-route-regex" 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>The Yaf_Route_Regex class</title> - <titleabbrev>Yaf_Route_Regex</titleabbrev> - - <partintro> - -<!-- {{{ Yaf_Route_Regex intro --> - <section xml:id="yaf-route-regex.intro"> - &reftitle.intro; - <para> - <classname>Yaf_Route_Regex</classname> 是Yaf内置的路由中最灵活的。 - </para> - </section> -<!-- }}} --> - - <section xml:id="yaf-route-regex.synopsis"> - &reftitle.classsynopsis; - -<!-- {{{ Synopsis --> - <classsynopsis> - <ooclass><classname>Yaf_Route_Regex</classname></ooclass> - -<!-- {{{ Class synopsis --> - <classsynopsisinfo> - <ooclass> - <classname>Yaf_Route_Regex</classname> - </ooclass> - - <ooclass> - <modifier>extends</modifier> - <classname>Yaf_Route_Interface</classname> - </ooclass> - - <oointerface> - <interfacename>Yaf_Route_Interface</interfacename> - </oointerface> - </classsynopsisinfo> -<!-- }}} --> - <classsynopsisinfo role="comment">&Properties;</classsynopsisinfo> - <fieldsynopsis> - <modifier>protected</modifier> - <varname linkend="yaf-route-regex.props.route">_route</varname> - </fieldsynopsis> - <fieldsynopsis> - <modifier>protected</modifier> - <varname linkend="yaf-route-regex.props.default">_default</varname> - </fieldsynopsis> - <fieldsynopsis> - <modifier>protected</modifier> - <varname linkend="yaf-route-regex.props.maps">_maps</varname> - </fieldsynopsis> - <fieldsynopsis> - <modifier>protected</modifier> - <varname linkend="yaf-route-regex.props.verify">_verify</varname> - </fieldsynopsis> - - - <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo> - <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.yaf-route-regex')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> - - <classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo> - <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.yaf-route-interface')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> - - </classsynopsis> -<!-- }}} --> - - </section> - - -<!-- {{{ Yaf_Route_Regex properties --> - <section xml:id="yaf-route-regex.props"> - &reftitle.properties; - <variablelist> - <varlistentry xml:id="yaf-route-regex.props.route"> - <term><varname>_route</varname></term> - <listitem> - <para></para> - </listitem> - </varlistentry> - <varlistentry xml:id="yaf-route-regex.props.default"> - <term><varname>_default</varname></term> - <listitem> - <para></para> - </listitem> - </varlistentry> - <varlistentry xml:id="yaf-route-regex.props.maps"> - <term><varname>_maps</varname></term> - <listitem> - <para></para> - </listitem> - </varlistentry> - <varlistentry xml:id="yaf-route-regex.props.verify"> - <term><varname>_verify</varname></term> - <listitem> - <para></para> - </listitem> - </varlistentry> - </variablelist> - </section> -<!-- }}} --> - - - </partintro> - - &reference.yaf.entities.yaf-route-regex; - -</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:"~/.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 ---> +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: 334960 $ --> + +<phpdoc:classref xml:id="class.yaf-route-regex" 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>The Yaf_Route_Regex class</title> + <titleabbrev>Yaf_Route_Regex</titleabbrev> + + <partintro> + +<!-- {{{ Yaf_Route_Regex intro --> + <section xml:id="yaf-route-regex.intro"> + &reftitle.intro; + <para> + <classname>Yaf_Route_Regex</classname> 是Yaf内置的路由中最灵活的。 + </para> + </section> +<!-- }}} --> + + <section xml:id="yaf-route-regex.synopsis"> + &reftitle.classsynopsis; + +<!-- {{{ Synopsis --> + <classsynopsis> + <ooclass><classname>Yaf_Route_Regex</classname></ooclass> + +<!-- {{{ Class synopsis --> + <classsynopsisinfo> + <ooclass> + <classname>Yaf_Route_Regex</classname> + </ooclass> + + <ooclass> + <modifier>extends</modifier> + <classname>Yaf_Route</classname> + </ooclass> + + <oointerface> + <interfacename>Yaf_Route_Interface</interfacename> + </oointerface> + </classsynopsisinfo> +<!-- }}} --> + <classsynopsisinfo role="comment">&Properties;</classsynopsisinfo> + <fieldsynopsis> + <modifier>protected</modifier> + <varname linkend="yaf-route-regex.props.route">_route</varname> + </fieldsynopsis> + <fieldsynopsis> + <modifier>protected</modifier> + <varname linkend="yaf-route-regex.props.default">_default</varname> + </fieldsynopsis> + <fieldsynopsis> + <modifier>protected</modifier> + <varname linkend="yaf-route-regex.props.maps">_maps</varname> + </fieldsynopsis> + <fieldsynopsis> + <modifier>protected</modifier> + <varname linkend="yaf-route-regex.props.verify">_verify</varname> + </fieldsynopsis> + + + <classsynopsisinfo role="comment">&Methods;</classsynopsisinfo> + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.yaf-route-regex')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> + + <classsynopsisinfo role="comment">&InheritedMethods;</classsynopsisinfo> + <xi:include xpointer="xmlns(db=http://docbook.org/ns/docbook) xpointer(id('class.yaf-route-interface')/db:refentry/db:refsect1[@role='description']/descendant::db:methodsynopsis[1])" /> + + </classsynopsis> +<!-- }}} --> + + </section> + + +<!-- {{{ Yaf_Route_Regex properties --> + <section xml:id="yaf-route-regex.props"> + &reftitle.properties; + <variablelist> + <varlistentry xml:id="yaf-route-regex.props.route"> + <term><varname>_route</varname></term> + <listitem> + <para></para> + </listitem> + </varlistentry> + <varlistentry xml:id="yaf-route-regex.props.default"> + <term><varname>_default</varname></term> + <listitem> + <para></para> + </listitem> + </varlistentry> + <varlistentry xml:id="yaf-route-regex.props.maps"> + <term><varname>_maps</varname></term> + <listitem> + <para></para> + </listitem> + </varlistentry> + <varlistentry xml:id="yaf-route-regex.props.verify"> + <term><varname>_verify</varname></term> + <listitem> + <para></para> + </listitem> + </varlistentry> + </variablelist> + </section> +<!-- }}} --> + + + </partintro> + + &reference.yaf.entities.yaf-route-regex; + +</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:"~/.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 +--> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=75882 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=75882 ------------------------------------------------------------------ Modified: zh/reference/spl/datastructures.xml By: 陈佳 on 2017-11-02 06:42:00 =================================================================== --- zh/reference/spl/datastructures.xml +++ zh/reference/spl/datastructures.xml @@ -9,19 +9,14 @@ <partintro> <para> - SPL提供了一组标准数据结构. They are grouped here by their - underlying implementation which usually defines their general field of - application. + SPL 提供了一套标准的数据结构。它们按底层实现进行分组, 通常定义了它们的一般应用领域。 </para> <section> <title>双向链表</title> <para> - A Doubly Linked List (DLL) is a list of nodes linked in both directions to - each others. Iterator's operations, access to both ends, addition or - removal of nodes have a cost of O(1) when the underlying structure is a DLL. - It hence provides a decent implementation for stacks and queues. + 双链表 (DLL) 是一个链接到两个方向的节点列表。当底层结构是 DLL 时, 迭代器的操作、对两端的访问、节点的添加或删除都具有 O (1) 的开销。因此, 它为栈和队列提供了一个合适的实现。 </para> <itemizedlist> @@ -39,9 +34,7 @@ <title>堆</title> <para> - Heaps are tree-like structures that follow the heap-property: each node - is greater than or equal to its children, when compared using the - implemented compare method which is global to the heap. + 堆是遵循堆属性的树状结构: 每个节点都大于或等于其子级, 使用对堆全局的已实现的比较方法进行比较。 </para> <itemizedlist> @@ -60,12 +53,10 @@ </section> <section> - <title>阵列</title> + <title>数组</title> <para> - Arrays are structures that store the data in a continuous way, accessible - via indexes. Don't confuse them with PHP arrays: PHP arrays are in fact - implemented as ordered hashtables. + 数组是以连续方式存储数据的结构, 可通过索引进行访问。不要将它们与 php 数组混淆: php 数组实际上是按照有序的列表实现的。 </para> <itemizedlist> @@ -80,7 +71,7 @@ <title>映射</title> <para> - A map is a datastructure holding key-value pairs. PHP arrays can be seen as maps from integers/strings to values. SPL provides a map from objects to data. This map can also be used as an object set. + 映射是一个数据拥有键值对。PHP 数组可以被看作是从整数/字符串到值的映射。SPL 提供了从对象到数据的映射。此映射也可用作对象集。 </para> <itemizedlist> => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=76072 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=76072 ------------------------------------------------------------------ Modified: zh/reference/pdo/book.xml By: 陈佳 on 2017-11-02 07:03:52 =================================================================== --- zh/reference/pdo/book.xml +++ zh/reference/pdo/book.xml @@ -14,11 +14,12 @@ <preface xml:id="intro.pdo"> &reftitle.intro; <para> - <literal>PHP 数据对象</literal> (<acronym>PDO</acronym>) 扩展为PHP访问数据库定义了一个轻量级的一致接口。实现 PDO 接口的每个数据库驱动可以公开具体数据库的特性作为标准扩展功能。 注意利用 PDO 扩展自身并不能实现任何数据库功能;必须使用一个 <link linkend="pdo.drivers">具体数据库的 PDO 驱动</link> 来访问数据库服务。 + <literal>PHP 数据对象</literal> (<acronym>PDO</acronym>) 扩展为PHP访问数据库定义了一个轻量级的一致接口。实现 PDO 接口的每个数据库驱动程序都可以将特定于数据库的功能公开为常规扩展功能。请注意, 不能使用 PDO 扩展本身来执行任何数据库函数;必须使用一个<link linkend="pdo.drivers">具体数据库的 PDO 驱动</link>特定的 PDO 驱动程序来访问数据库服务器。 </para> + <para> - PDO 提供了一个 <emphasis>数据访问</emphasis> 抽象层,这意味着,不管使用哪种数据库,都可以用相同的函数(方法)来查询和获取数据。 PDO - <emphasis>不</emphasis>提供 <emphasis>数据库</emphasis> 抽象层;它不会重写 SQL,也不会模拟缺失的特性。如果需要的话,应该使用一个成熟的抽象层。 + PDO 提供了一个<emphasis>数据访问</emphasis>抽象层, 这意味着无论您使用的是哪个数据库, 您都可以使用相同的函数来发出查询和获取数据。PDO <emphasis>不</emphasis>提供<emphasis>数据库</emphasis>抽象;它不重写 SQL 或模拟缺少的功能。如果你需要这个工具, 你应该使用一个成熟的抽象层。 + </para> <para> 从 PHP 5.1 开始附带了 PDO,在 PHP 5.0 中是作为一个 PECL 扩展使用。 => Put this change into your patches : https://edit.php.net/?project=php&action=putIntoMyPatches&idDB=76075 => Delete this change: https://edit.php.net/?project=php&action=deleteThisChange&idDB=76075 ------------------------------------------------------------------ -- https://edit.php.net/ This email is send automatically by the Php Docbook Online Editor.

« previous php.doc.zh (#5035) next »