mirror of
https://github.com/php/doc-zh.git
synced 2026-04-26 01:28:18 +02:00
541e8c7610
* Update reflectionenum.xml * Update construct.xml * Update getbackingtype.xml * Update getcase.xml * Update getcases.xml * Update hascase.xml * Update isbacked.xml * Update reflectionenumbackedcase.xml * Update getbackingvalue.xml * Update reflectionenumunitcase.xml * Update getenum.xml * Update getvalue.xml * Update reflectionextension.xml * Update clone.xml * Update construct.xml * Update export.xml * Update getclasses.xml * Update getclassnames.xml * Update getconstants.xml * Update getdependencies.xml * Update getfunctions.xml * Update getinientries.xml * Update getname.xml * Update getversion.xml * Update info.xml * Update ispersistent.xml * Update istemporary.xml * Update tostring.xml * Update clone.xml * Update getclosurethis.xml * Update getdoccomment.xml * Update getendline.xml * Update getextension.xml * Update getextensionname.xml * Update getfilename.xml * Update getname.xml * Update getnamespacename.xml * Update getnumberofparameters.xml * Update getnumberofrequiredparameters.xml * Update getparameters.xml * Update getshortname.xml * Update getstartline.xml * Update getstaticvariables.xml * Update innamespace.xml * Update isclosure.xml * Update isdeprecated.xml * Update isgenerator.xml * Update isinternal.xml * Update isuserdefined.xml * Update returnsreference.xml * Update tostring.xml * Update reflectionfunctionabstract.xml * Update reflectionintersectiontype.xml * Update gettypes.xml * Update reflectionfiber.xml
135 lines
3.4 KiB
XML
135 lines
3.4 KiB
XML
<?xml version="1.0" encoding="utf-8"?>
|
|
<!-- $Revision$ -->
|
|
<!-- EN-Revision: ec2fe9a592f794978114ef5021db9f1d00c2e05d Maintainer: benson zhai Status: ready -->
|
|
<!-- CREDITS: mowangjuanzi -->
|
|
<refentry xml:id="reflectionextension.getconstants" xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink">
|
|
<refnamediv>
|
|
<refname>ReflectionExtension::getConstants</refname>
|
|
<refpurpose>获取常量</refpurpose>
|
|
</refnamediv>
|
|
|
|
<refsect1 role="description">
|
|
&reftitle.description;
|
|
<methodsynopsis role="ReflectionExtension">
|
|
<modifier>public</modifier> <type>array</type><methodname>ReflectionExtension::getConstants</methodname>
|
|
<void/>
|
|
</methodsynopsis>
|
|
<para>
|
|
获取扩展中定义的常量。
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="parameters">
|
|
&reftitle.parameters;
|
|
&no.function.parameters;
|
|
</refsect1>
|
|
|
|
<refsect1 role="returnvalues">
|
|
&reftitle.returnvalues;
|
|
<para>
|
|
返回一个以常量名称为索引的数组。
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="examples">
|
|
&reftitle.examples;
|
|
<para>
|
|
<example>
|
|
<title><methodname>ReflectionExtension::getConstants</methodname> example</title>
|
|
<programlisting role="php">
|
|
<![CDATA[
|
|
<?php
|
|
$ext = new ReflectionExtension('DOM');
|
|
|
|
print_r($ext->getConstants());
|
|
?>
|
|
]]>
|
|
</programlisting>
|
|
&example.outputs.similar;
|
|
<screen>
|
|
<![CDATA[
|
|
Array
|
|
(
|
|
[XML_ELEMENT_NODE] => 1
|
|
[XML_ATTRIBUTE_NODE] => 2
|
|
[XML_TEXT_NODE] => 3
|
|
[XML_CDATA_SECTION_NODE] => 4
|
|
[XML_ENTITY_REF_NODE] => 5
|
|
[XML_ENTITY_NODE] => 6
|
|
[XML_PI_NODE] => 7
|
|
[XML_COMMENT_NODE] => 8
|
|
[XML_DOCUMENT_NODE] => 9
|
|
[XML_DOCUMENT_TYPE_NODE] => 10
|
|
[XML_DOCUMENT_FRAG_NODE] => 11
|
|
[XML_NOTATION_NODE] => 12
|
|
[XML_HTML_DOCUMENT_NODE] => 13
|
|
[XML_DTD_NODE] => 14
|
|
[XML_ELEMENT_DECL_NODE] => 15
|
|
[XML_ATTRIBUTE_DECL_NODE] => 16
|
|
[XML_ENTITY_DECL_NODE] => 17
|
|
[XML_NAMESPACE_DECL_NODE] => 18
|
|
[XML_LOCAL_NAMESPACE] => 18
|
|
[XML_ATTRIBUTE_CDATA] => 1
|
|
[XML_ATTRIBUTE_ID] => 2
|
|
[XML_ATTRIBUTE_IDREF] => 3
|
|
[XML_ATTRIBUTE_IDREFS] => 4
|
|
[XML_ATTRIBUTE_ENTITY] => 6
|
|
[XML_ATTRIBUTE_NMTOKEN] => 7
|
|
[XML_ATTRIBUTE_NMTOKENS] => 8
|
|
[XML_ATTRIBUTE_ENUMERATION] => 9
|
|
[XML_ATTRIBUTE_NOTATION] => 10
|
|
[DOM_PHP_ERR] => 0
|
|
[DOM_INDEX_SIZE_ERR] => 1
|
|
[DOMSTRING_SIZE_ERR] => 2
|
|
[DOM_HIERARCHY_REQUEST_ERR] => 3
|
|
[DOM_WRONG_DOCUMENT_ERR] => 4
|
|
[DOM_INVALID_CHARACTER_ERR] => 5
|
|
[DOM_NO_DATA_ALLOWED_ERR] => 6
|
|
[DOM_NO_MODIFICATION_ALLOWED_ERR] => 7
|
|
[DOM_NOT_FOUND_ERR] => 8
|
|
[DOM_NOT_SUPPORTED_ERR] => 9
|
|
[DOM_INUSE_ATTRIBUTE_ERR] => 10
|
|
[DOM_INVALID_STATE_ERR] => 11
|
|
[DOM_SYNTAX_ERR] => 12
|
|
[DOM_INVALID_MODIFICATION_ERR] => 13
|
|
[DOM_NAMESPACE_ERR] => 14
|
|
[DOM_INVALID_ACCESS_ERR] => 15
|
|
[DOM_VALIDATION_ERR] => 16
|
|
)
|
|
]]>
|
|
</screen>
|
|
</example>
|
|
</para>
|
|
</refsect1>
|
|
|
|
<refsect1 role="seealso">
|
|
&reftitle.seealso;
|
|
<para>
|
|
<simplelist>
|
|
<member><methodname>ReflectionExtension::getINIEntries</methodname></member>
|
|
</simplelist>
|
|
</para>
|
|
</refsect1>
|
|
|
|
</refentry>
|
|
<!-- Keep this comment at the end of the file
|
|
Local variables:
|
|
mode: sgml
|
|
sgml-omittag:t
|
|
sgml-shorttag:t
|
|
sgml-minimize-attributes:nil
|
|
sgml-always-quote-attributes:t
|
|
sgml-indent-step:1
|
|
sgml-indent-data:t
|
|
indent-tabs-mode:nil
|
|
sgml-parent-document:nil
|
|
sgml-default-dtd-file:"~/.phpdoc/manual.ced"
|
|
sgml-exposed-tags:nil
|
|
sgml-local-catalogs:nil
|
|
sgml-local-ecat-files:nil
|
|
End:
|
|
vim600: syn=xml fen fdm=syntax fdl=2 si
|
|
vim: et tw=78 syn=sgml
|
|
vi: ts=1 sw=1
|
|
-->
|