Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > f800694edefe91adea2624f711a41a2d > files > 5602

php-manual-en-5.5.7-1.mga4.noarch.rpm

<!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>Extracts the data from a tagged attribute</title>

 </head>
 <body><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.radius-get-attr.html">radius_get_attr</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.radius-get-tagged-attr-tag.html">radius_get_tagged_attr_tag</a></div>
 <div class="up"><a href="ref.radius.html">Radius Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div><hr /><div id="function.radius-get-tagged-attr-data" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">radius_get_tagged_attr_data</h1>
  <p class="verinfo">(PECL radius &gt;= 1.3.0)</p><p class="refpurpose"><span class="refname">radius_get_tagged_attr_data</span> &mdash; <span class="dc-title">Extracts the data from a tagged attribute</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-function.radius-get-tagged-attr-data-description">
  <h3 class="title">Description</h3>
  <div class="methodsynopsis dc-description">
   <span class="type">string</span> <span class="methodname"><strong>radius_get_tagged_attr_data</strong></span>
    ( <span class="methodparam"><span class="type">string</span> <code class="parameter">$data</code></span>
   )</div>

  <p class="para rdfs-comment">
   If a tagged attribute has been returned from
    <span class="function"><a href="function.radius-get-attr.html" class="function">radius_get_attr()</a></span>,
    <span class="function"><strong>radius_get_tagged_attr_data()</strong></span> will return the data from
   the attribute.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-function.radius-get-tagged-attr-data-parameters">
  <h3 class="title">Parameters</h3>
  <p class="para">
   <dl>

    <dt>

     <span class="term"><em><code class="parameter">data</code></em></span>
     <dd>

      <p class="para">
       The tagged attribute to be decoded.
      </p>
     </dd>

    </dt>

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-function.radius-get-tagged-attr-data-returnvalues">
  <h3 class="title">Return Values</h3>
  <p class="para">
   Returns the data from the tagged attribute  or <strong><code>FALSE</code></strong> on failure.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-function.radius-get-tagged-attr-data-examples">
  <h3 class="title">Examples</h3>
  <p class="para">
   <div class="example" id="example-621">
    <p><strong>Example #1  <span class="function"><strong>radius_get_tagged_attr_data()</strong></span> example</strong></p>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /></span><span style="color: #007700">while&nbsp;(</span><span style="color: #0000BB">$resa&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">radius_get_attr</span><span style="color: #007700">(</span><span style="color: #0000BB">$res</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;if&nbsp;(!</span><span style="color: #0000BB">is_array</span><span style="color: #007700">(</span><span style="color: #0000BB">$resa</span><span style="color: #007700">))&nbsp;{<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">printf&nbsp;</span><span style="color: #007700">(</span><span style="color: #DD0000">"Error&nbsp;getting&nbsp;attribute:&nbsp;%s\n"</span><span style="color: #007700">,&nbsp;&nbsp;</span><span style="color: #0000BB">radius_strerror</span><span style="color: #007700">(</span><span style="color: #0000BB">$res</span><span style="color: #007700">));<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;exit;<br />&nbsp;&nbsp;&nbsp;&nbsp;}<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$attr&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$resa</span><span style="color: #007700">[</span><span style="color: #DD0000">'attr'</span><span style="color: #007700">];<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$data&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">$resa</span><span style="color: #007700">[</span><span style="color: #DD0000">'data'</span><span style="color: #007700">];<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$tag&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">radius_get_tagged_attr_tag</span><span style="color: #007700">(</span><span style="color: #0000BB">$data</span><span style="color: #007700">);<br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">$value&nbsp;</span><span style="color: #007700">=&nbsp;</span><span style="color: #0000BB">radius_get_tagged_attr_data</span><span style="color: #007700">(</span><span style="color: #0000BB">$data</span><span style="color: #007700">);<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: #0000BB">printf</span><span style="color: #007700">(</span><span style="color: #DD0000">"Got&nbsp;tagged&nbsp;attribute&nbsp;with&nbsp;tag&nbsp;%d&nbsp;and&nbsp;value&nbsp;%s\n"</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$tag</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">$value</span><span style="color: #007700">);<br />}<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


 <div class="refsect1 seealso" id="refsect1-function.radius-get-tagged-attr-data-seealso">
  <h3 class="title">See Also</h3>
  <p class="para">
   <ul class="simplelist">
    <li class="member"> <span class="function"><a href="function.radius-get-attr.html" class="function" rel="rdfs-seeAlso">radius_get_attr()</a> - Extracts an attribute</span></li>
    <li class="member"> <span class="function"><a href="function.radius-get-tagged-attr-tag.html" class="function" rel="rdfs-seeAlso">radius_get_tagged_attr_tag()</a> - Extracts the tag from a tagged attribute</span></li>
   </ul>
  </p>
 </div>

</div><hr /><div class="manualnavbar" style="text-align: center;">
 <div class="prev" style="text-align: left; float: left;"><a href="function.radius-get-attr.html">radius_get_attr</a></div>
 <div class="next" style="text-align: right; float: right;"><a href="function.radius-get-tagged-attr-tag.html">radius_get_tagged_attr_tag</a></div>
 <div class="up"><a href="ref.radius.html">Radius Functions</a></div>
 <div class="home"><a href="index.html">PHP Manual</a></div>
</div></body></html>