This commit is contained in:
fofolee
2019-04-28 19:00:34 +08:00
parent a895309fba
commit f782158fb7
4705 changed files with 471929 additions and 471947 deletions

View File

@@ -1,147 +1,147 @@
<!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>Attaches a vendor specific binary attribute</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.radius-put-vendor-attr" class="refentry">
<div class="refnamediv">
<h1 class="refname">radius_put_vendor_attr</h1>
<p class="verinfo">(PECL radius &gt;= 1.1.0)</p><p class="refpurpose"><span class="refname">radius_put_vendor_attr</span> &mdash; <span class="dc-title">Attaches a vendor specific binary attribute</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.radius-put-vendor-attr-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>radius_put_vendor_attr</strong></span>
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$radius_handle</code></span>
, <span class="methodparam"><span class="type">int</span> <code class="parameter">$vendor</code></span>
, <span class="methodparam"><span class="type">int</span> <code class="parameter">$type</code></span>
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>
[, <span class="methodparam"><span class="type">int</span> <code class="parameter">$options</code><span class="initializer"> = 0</span></span>
[, <span class="methodparam"><span class="type">int</span> <code class="parameter">$tag</code></span>
]] ) : <span class="type">bool</span></div>
<p class="para rdfs-comment">
Attaches a vendor specific binary attribute to the current RADIUS request.
</p>
<blockquote class="note"><p><strong class="note">Note</strong>: <p class="para">A request must be created via <span class="function"><a href="radius_create_request.html" class="function">radius_create_request()</a></span> before this function can be called.</p></p></blockquote>
</div>
<div class="refsect1 parameters" id="refsect1-function.radius-put-vendor-attr-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">radius_handle</code></dt>
<dd>
<p class="para">The RADIUS resource.</p></dd>
<dt>
<code class="parameter">vendor</code></dt>
<dd>
<p class="para">The vendor ID.</p></dd>
<dt>
<code class="parameter">type</code></dt>
<dd>
<p class="para">The attribute type.</p></dd>
<dt>
<code class="parameter">value</code></dt>
<dd>
<p class="para">
The attribute value, which will be treated as a raw binary string.
</p>
</dd>
<dt>
<code class="parameter">options</code></dt>
<dd>
<p class="para">A bitmask of the attribute options. The available options include <a href="radius.constants.options.html#constant.radius-option-tagged" class="link"><strong><code>RADIUS_OPTION_TAGGED</code></strong></a> and <a href="radius.constants.options.html#constant.radius-option-salt" class="link"><strong><code>RADIUS_OPTION_SALT</code></strong></a>.</p></dd>
<dt>
<code class="parameter">tag</code></dt>
<dd>
<p class="para">The attribute tag. This parameter is ignored unless the <a href="radius.constants.options.html#constant.radius-option-tagged" class="link"><strong><code>RADIUS_OPTION_TAGGED</code></strong></a> option is set.</p></dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.radius-put-vendor-attr-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
成功时返回 <strong><code>TRUE</code></strong> 或者在失败时返回 <strong><code>FALSE</code></strong>
</p>
</div>
<div class="refsect1 changelog" id="refsect1-function.radius-put-vendor-attr-changelog">
<h3 class="title">更新日志</h3>
<p class="para">
<table class="doctable informaltable">
<thead>
<tr>
<th>版本</th>
<th>说明</th>
</tr>
</thead>
<tbody class="tbody">
<tr>
<td>PECL radius 1.3.0</td>
<td>
The <code class="parameter">options</code> and <code class="parameter">tag</code>
parameters were added.
</td>
</tr>
</tbody>
</table>
</p>
</div>
<div class="refsect1 examples" id="refsect1-function.radius-put-vendor-attr-examples">
<h3 class="title">范例</h3>
<p class="para">
<div class="example" id="example-678">
<p><strong>Example #1 <span class="function"><strong>radius_put_vendor_attr()</strong></span> example</strong></p>
<div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">radius_put_vendor_attr</span><span style="color: #007700">(</span><span style="color: #0000BB">$res</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">RADIUS_VENDOR_MICROSOFT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">RAD_MICROSOFT_MS_CHAP_CHALLENGE</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$challenge</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">'RadiusError:'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">radius_strerror</span><span style="color: #007700">(</span><span style="color: #0000BB">$res</span><span style="color: #007700">).&nbsp;</span><span style="color: #DD0000">"\n&lt;br&nbsp;/&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;exit;<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
</div>
</div>
</p>
</div>
<div class="refsect1 seealso" id="refsect1-function.radius-put-vendor-attr-seealso">
<h3 class="title">参见</h3>
<p class="para">
<ul class="simplelist">
<li class="member"><span class="function"><a href="radius_get_vendor_attr.html" class="function" rel="rdfs-seeAlso">radius_get_vendor_attr()</a> - Extracts a vendor specific attribute</span></li>
</ul>
</p>
</div>
<!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>Attaches a vendor specific binary attribute</title>
</head>
<body class="docs"><div id="layout">
<div id="layout-content"><div id="function.radius-put-vendor-attr" class="refentry">
<div class="refnamediv">
<h1 class="refname">radius_put_vendor_attr</h1>
<p class="verinfo">(PECL radius &gt;= 1.1.0)</p><p class="refpurpose"><span class="refname">radius_put_vendor_attr</span> &mdash; <span class="dc-title">Attaches a vendor specific binary attribute</span></p>
</div>
<div class="refsect1 description" id="refsect1-function.radius-put-vendor-attr-description">
<h3 class="title">说明</h3>
<div class="methodsynopsis dc-description">
<span class="methodname"><strong>radius_put_vendor_attr</strong></span>
( <span class="methodparam"><span class="type">resource</span> <code class="parameter">$radius_handle</code></span>
, <span class="methodparam"><span class="type">int</span> <code class="parameter">$vendor</code></span>
, <span class="methodparam"><span class="type">int</span> <code class="parameter">$type</code></span>
, <span class="methodparam"><span class="type">string</span> <code class="parameter">$value</code></span>
[, <span class="methodparam"><span class="type">int</span> <code class="parameter">$options</code><span class="initializer"> = 0</span></span>
[, <span class="methodparam"><span class="type">int</span> <code class="parameter">$tag</code></span>
]] ) : <span class="type">bool</span></div>
<p class="para rdfs-comment">
Attaches a vendor specific binary attribute to the current RADIUS request.
</p>
<blockquote class="note"><p><strong class="note">Note</strong>: <p class="para">A request must be created via <span class="function"><a href="radius_create_request.html" class="function">radius_create_request()</a></span> before this function can be called.</p></p></blockquote>
</div>
<div class="refsect1 parameters" id="refsect1-function.radius-put-vendor-attr-parameters">
<h3 class="title">参数</h3>
<p class="para">
<dl>
<dt>
<code class="parameter">radius_handle</code></dt>
<dd>
<p class="para">The RADIUS resource.</p></dd>
<dt>
<code class="parameter">vendor</code></dt>
<dd>
<p class="para">The vendor ID.</p></dd>
<dt>
<code class="parameter">type</code></dt>
<dd>
<p class="para">The attribute type.</p></dd>
<dt>
<code class="parameter">value</code></dt>
<dd>
<p class="para">
The attribute value, which will be treated as a raw binary string.
</p>
</dd>
<dt>
<code class="parameter">options</code></dt>
<dd>
<p class="para">A bitmask of the attribute options. The available options include <a href="radius.constants.options.html#constant.radius-option-tagged" class="link"><strong><code>RADIUS_OPTION_TAGGED</code></strong></a> and <a href="radius.constants.options.html#constant.radius-option-salt" class="link"><strong><code>RADIUS_OPTION_SALT</code></strong></a>.</p></dd>
<dt>
<code class="parameter">tag</code></dt>
<dd>
<p class="para">The attribute tag. This parameter is ignored unless the <a href="radius.constants.options.html#constant.radius-option-tagged" class="link"><strong><code>RADIUS_OPTION_TAGGED</code></strong></a> option is set.</p></dd>
</dl>
</p>
</div>
<div class="refsect1 returnvalues" id="refsect1-function.radius-put-vendor-attr-returnvalues">
<h3 class="title">返回值</h3>
<p class="para">
成功时返回 <strong><code>TRUE</code></strong> 或者在失败时返回 <strong><code>FALSE</code></strong>
</p>
</div>
<div class="refsect1 changelog" id="refsect1-function.radius-put-vendor-attr-changelog">
<h3 class="title">更新日志</h3>
<p class="para">
<table class="doctable informaltable">
<thead>
<tr>
<th>版本</th>
<th>说明</th>
</tr>
</thead>
<tbody class="tbody">
<tr>
<td>PECL radius 1.3.0</td>
<td>
The <code class="parameter">options</code> and <code class="parameter">tag</code>
parameters were added.
</td>
</tr>
</tbody>
</table>
</p>
</div>
<div class="refsect1 examples" id="refsect1-function.radius-put-vendor-attr-examples">
<h3 class="title">范例</h3>
<p class="para">
<div class="example" id="example-678">
<p><strong>Example #1 <span class="function"><strong>radius_put_vendor_attr()</strong></span> example</strong></p>
<div class="example-contents">
<div class="phpcode"><pre><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">if&nbsp;(!</span><span style="color: #0000BB">radius_put_vendor_attr</span><span style="color: #007700">(</span><span style="color: #0000BB">$res</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">RADIUS_VENDOR_MICROSOFT</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">RAD_MICROSOFT_MS_CHAP_CHALLENGE</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$challenge</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;echo&nbsp;</span><span style="color: #DD0000">'RadiusError:'&nbsp;</span><span style="color: #007700">.&nbsp;</span><span style="color: #0000BB">radius_strerror</span><span style="color: #007700">(</span><span style="color: #0000BB">$res</span><span style="color: #007700">).&nbsp;</span><span style="color: #DD0000">"\n&lt;br&nbsp;/&gt;"</span><span style="color: #007700">;<br />&nbsp;&nbsp;&nbsp;&nbsp;exit;<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</pre></div>
</div>
</div>
</p>
</div>
<div class="refsect1 seealso" id="refsect1-function.radius-put-vendor-attr-seealso">
<h3 class="title">参见</h3>
<p class="para">
<ul class="simplelist">
<li class="member"><span class="function"><a href="radius_get_vendor_attr.html" class="function" rel="rdfs-seeAlso">radius_get_vendor_attr()</a> - Extracts a vendor specific attribute</span></li>
</ul>
</p>
</div>
</div></div></div></body></html>