mirror of
https://github.com/fofolee/uTools-Manuals.git
synced 2025-06-18 22:06:57 +08:00
81 lines
3.5 KiB
HTML
81 lines
3.5 KiB
HTML
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
|
<html>
|
|
<head>
|
|
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
|
|
<title>返回由已定义类的名字所组成的数组</title>
|
|
</head>
|
|
<body class="docs"><div id="layout">
|
|
<div id="layout-content"><div id="function.get-declared-classes" class="refentry">
|
|
<div class="refnamediv">
|
|
<h1 class="refname">get_declared_classes</h1>
|
|
<p class="verinfo">(PHP 4, PHP 5, PHP 7)</p><p class="refpurpose"><span class="refname">get_declared_classes</span> — <span class="dc-title">返回由已定义类的名字所组成的数组</span></p>
|
|
|
|
</div>
|
|
<div class="refsect1 description" id="refsect1-function.get-declared-classes-description">
|
|
<h3 class="title">说明</h3>
|
|
<div class="methodsynopsis dc-description">
|
|
<span class="methodname"><strong>get_declared_classes</strong></span>
|
|
( <span class="methodparam">void</span>
|
|
) : <span class="type">array</span></div>
|
|
|
|
<p class="para rdfs-comment">
|
|
返回由当前脚本中已定义类的名字组成的数组。
|
|
</p>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 returnvalues" id="refsect1-function.get-declared-classes-returnvalues">
|
|
<h3 class="title">返回值</h3>
|
|
<p class="para">
|
|
返回由当前脚本中已定义类的名字组成的数组。
|
|
</p>
|
|
<blockquote class="note"><p><strong class="note">Note</strong>:
|
|
<p class="para">
|
|
需要注意的是额外类的出现依赖于你已编译到 PHP
|
|
中的库。这意味着你不能使用这些类名定义自己的类。在附录的
|
|
<a href="reserved.classes.html" class="link">预定义类</a>
|
|
部分有预定义类的列表。
|
|
</p>
|
|
</p></blockquote>
|
|
</div>
|
|
|
|
|
|
<div class="refsect1 examples" id="refsect1-function.get-declared-classes-examples">
|
|
<h3 class="title">范例</h3>
|
|
<p class="para">
|
|
<div class="example" id="example-6140">
|
|
<p><strong>Example #1 <span class="function"><strong>get_declared_classes()</strong></span> 例子</strong></p>
|
|
<div class="example-contents">
|
|
<div class="phpcode"><pre><span style="color: #000000">
|
|
<span style="color: #0000BB"><?php<br />print_r</span><span style="color: #007700">(</span><span style="color: #0000BB">get_declared_classes</span><span style="color: #007700">());<br /></span><span style="color: #0000BB">?></span>
|
|
</span>
|
|
</pre></div>
|
|
</div>
|
|
|
|
<div class="example-contents"><p>以上例程的输出类似于:</p></div>
|
|
<div class="example-contents screen">
|
|
<div class="cdata"><pre>
|
|
Array
|
|
(
|
|
[0] => stdClass
|
|
[1] => __PHP_Incomplete_Class
|
|
[2] => Directory
|
|
)
|
|
</pre></div>
|
|
</div>
|
|
</div>
|
|
</p>
|
|
</div>
|
|
|
|
<div class="refsect1 seealso" id="refsect1-function.get-declared-classes-seealso">
|
|
<h3 class="title">参见</h3>
|
|
<p class="para">
|
|
<ul class="simplelist">
|
|
<li class="member"><span class="function"><a href="class_exists.html" class="function" rel="rdfs-seeAlso">class_exists()</a> - 检查类是否已定义</span></li>
|
|
<li class="member"><span class="function"><a href="get_declared_interfaces.html" class="function" rel="rdfs-seeAlso">get_declared_interfaces()</a> - 返回一个数组包含所有已声明的接口</span></li>
|
|
<li class="member"><span class="function"><a href="get_defined_functions.html" class="function" rel="rdfs-seeAlso">get_defined_functions()</a> - 返回所有已定义函数的数组</span></li>
|
|
</ul>
|
|
</p>
|
|
</div>
|
|
|
|
</div></div></div></body></html> |