Contributions are ready for review

From: Date: Mon, 15 May 2017 12:00:02 +0000
Subject: Contributions are ready for review
Groups: php.doc.zh 
Request: Send a blank email to doc-zh+get-4944@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 =================================================================== --- zh/reference/pdf/functions/pdf-load-image.xml +++ zh/reference/pdf/functions/pdf-load-image.xml @@ -0,0 +1,45 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: $ --> +<!-- EN-Revision: 297028 Maintainer: shanmin Status: ready --> +<!-- Reviewed: no --> + +<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.pdf-load-image"> + <refnamediv> + <refname>PDF_load_image</refname> + <refpurpose>打开一个图像文件</refpurpose> + </refnamediv> + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>int</type><methodname>PDF_load_image</methodname> + <methodparam><type>resource</type><parameter>pdfdoc</parameter></methodparam> + <methodparam><type>string</type><parameter>imagetype</parameter></methodparam> + <methodparam><type>string</type><parameter>filename</parameter></methodparam> + <methodparam><type>string</type><parameter>optlist</parameter></methodparam> + </methodsynopsis> + <para> + 使用指定选项,打开一个基于磁盘的或虚拟的图像文件。 + </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 +--> => 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 =================================================================== --- zh/reference/pdf/functions/pdf-end-document.xml +++ zh/reference/pdf/functions/pdf-end-document.xml @@ -0,0 +1,43 @@ +<?xml version="1.0" encoding="utf-8"?> +<!-- $Revision: $ --> +<!-- EN-Revision: 297028 Maintainer: shanmin Status: ready --> +<!-- Reviewed: no --> + +<refentry xmlns="http://docbook.org/ns/docbook" xml:id="function.pdf-end-document"> + <refnamediv> + <refname>PDF_end_document</refname> + <refpurpose>关闭 PDF 文件</refpurpose> + </refnamediv> + <refsect1 role="description"> + &reftitle.description; + <methodsynopsis> + <type>bool</type><methodname>PDF_end_document</methodname> + <methodparam><type>resource</type><parameter>pdfdoc</parameter></methodparam> + <methodparam><type>string</type><parameter>optlist</parameter></methodparam> + </methodsynopsis> + <para> + 使用指定的选项,关闭生成的 PDF 文件。 + </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 +--> => 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 ------------------------------------------------------------------ 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 ------------------------------------------------------------------ -- https://edit.php.net/ This email is send automatically by the Php Docbook Online Editor.

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