uTools-Manuals/docs/php/trait_exists.html
2019-04-28 19:00:34 +08:00

72 lines
2.1 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!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>检查指定的 trait 是否存在</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.trait-exists" class="refentry">
<div class="refnamediv">
<h1 class="refname">trait_exists</h1>
<p class="verinfo">(PHP 5 &gt;= 5.4.0, PHP 7)</p><p class="refpurpose"><span class="refname">trait_exists</span> &mdash; <span class="dc-title">检查指定的 trait 是否存在</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.trait-exists-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>trait_exists</strong></span>
( <span class="methodparam"><span class="type">string</span> <code class="parameter">$traitname</code></span>
[, <span class="methodparam"><span class="type">bool</span> <code class="parameter">$autoload</code></span>
] ) : <span class="type">bool</span></div>
<p class="para rdfs-comment">
</p>
</div>
<div class="refsect1 parameters" id="refsect1-function.trait-exists-parameters">
<h3 class="title">参数</h3>
<dl>
<dt>
<code class="parameter">traitname</code></dt>
<dd>
<p class="para">
待检查的 trait 的名称
</p>
</dd>
<dt>
<code class="parameter">autoload</code></dt>
<dd>
<p class="para">
如果尚未加载是否使用自动加载autoload
</p>
</dd>
</dl>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.trait-exists-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
如果 trait 存在返回 <strong><code>TRUE</code></strong>,不存在则返回 <strong><code>FALSE</code></strong>。发生错误的时候返回 <strong><code>NULL</code></strong>
</p>
</div>
</div></div></div></body></html>