<?php
include_once $_SERVER['DOCUMENT_ROOT'] . '/include/shared-manual.inc';
$TOC = array();
$TOC_DEPRECATED = array();
$PARENTS = array();
include_once dirname(__FILE__) ."/toc/class.stomp.inc";
$setup = array (
  'home' => 
  array (
    0 => 'index.php',
    1 => 'PHP Manual',
  ),
  'head' => 
  array (
    0 => 'UTF-8',
    1 => 'it',
  ),
  'this' => 
  array (
    0 => 'stomp.getsessionid.php',
    1 => 'Stomp::getSessionId',
    2 => 'Gets the current stomp session ID',
  ),
  'up' => 
  array (
    0 => 'class.stomp.php',
    1 => 'Stomp',
  ),
  'prev' => 
  array (
    0 => 'stomp.getreadtimeout.php',
    1 => 'Stomp::getReadTimeout',
  ),
  'next' => 
  array (
    0 => 'stomp.hasframe.php',
    1 => 'Stomp::hasFrame',
  ),
  'alternatives' => 
  array (
  ),
  'source' => 
  array (
    'lang' => 'en',
    'path' => 'reference/stomp/stomp/getsessionid.xml',
  ),
  'history' => 
  array (
  ),
);
$setup["toc"] = $TOC;
$setup["toc_deprecated"] = $TOC_DEPRECATED;
$setup["parents"] = $PARENTS;
manual_setup($setup);

contributors($setup);

?>
<div id="stomp.getsessionid" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Stomp::getSessionId</h1>
  <h1 class="refname">stomp_get_session_id</h1>
  <p class="verinfo">(PECL stomp &gt;= 0.1.0)</p><p class="refpurpose"><span class="refname">Stomp::getSessionId</span> -- <span class="refname">stomp_get_session_id</span> &mdash; <span class="dc-title">Gets the current stomp session ID</span></p>

 </div>

 <div class="refsect1 description" id="refsect1-stomp.getsessionid-description">
  <h3 class="title">Descrizione</h3>
  <p class="simpara">Stile orientato agli oggetti (method):</p>
   <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Stomp::getSessionId</strong></span>(): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="simpara">Stile procedurale:</p>
  <div class="methodsynopsis dc-description"><span class="methodname"><strong>stomp_get_session_id</strong></span>(<span class="methodparam"><span class="type"><a href="language.types.resource.php" class="type resource">resource</a></span> <code class="parameter">$link</code></span>): <span class="type"><span class="type"><a href="language.types.string.php" class="type string">string</a></span>|<span class="type"><a href="language.types.singleton.php" class="type false">false</a></span></span></div>

  <p class="simpara">
   Gets the current stomp session ID.
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-stomp.getsessionid-parameters">
  <h3 class="title">Elenco dei parametri</h3>
  <dl>
   <dt><code class="parameter">link</code></dt><dd><p class="para">Solo stile procedurale: l&#039;identificatore di connessione stomp restituito da <span class="function"><a href="stomp.construct.php" class="function">stomp_connect()</a></span>.</p></dd>
  </dl>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-stomp.getsessionid-returnvalues">
  <h3 class="title">Valori restituiti</h3>
  <p class="simpara">
    <span class="type"><a href="language.types.string.php" class="type string">string</a></span> session id on success o <strong><code><a href="reserved.constants.php#constant.false">false</a></code></strong> in caso di fallimento.
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-stomp.getsessionid-examples">
  <h3 class="title">Esempi</h3>
  <div class="example" id="example-1">
   <p><strong>Example #1 Stile orientato agli oggetti</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">/* connection */<br /></span><span style="color: #007700">try {<br />    </span><span style="color: #0000BB">$stomp </span><span style="color: #007700">= new </span><span style="color: #0000BB">Stomp</span><span style="color: #007700">(</span><span style="color: #DD0000">'tcp://localhost:61613'</span><span style="color: #007700">);<br />} catch(</span><span style="color: #0000BB">StompException $e</span><span style="color: #007700">) {<br />    die(</span><span style="color: #DD0000">'Connection failed: ' </span><span style="color: #007700">. </span><span style="color: #0000BB">$e</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getMessage</span><span style="color: #007700">());<br />}<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">$stomp</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">getSessionId</span><span style="color: #007700">());<br /><br /></span><span style="color: #FF8000">/* close connection */<br /></span><span style="color: #007700">unset(</span><span style="color: #0000BB">$stomp</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Il precedente esempio visualizzerà
qualcosa simile a:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">string(35) &quot;ID:php.net-52873-1257291895530-4:14&quot;</pre>
</div>
   </div>
  </div>
  <div class="example" id="example-2">
   <p><strong>Example #2 Stile procedurale</strong></p>
   <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000"><span style="color: #0000BB">&lt;?php<br /><br /></span><span style="color: #FF8000">/* connection */<br /></span><span style="color: #0000BB">$link </span><span style="color: #007700">= </span><span style="color: #0000BB">stomp_connect</span><span style="color: #007700">(</span><span style="color: #DD0000">'ssl://localhost:61612'</span><span style="color: #007700">);<br /><br /></span><span style="color: #FF8000">/* check connection */<br /></span><span style="color: #007700">if (!</span><span style="color: #0000BB">$link</span><span style="color: #007700">) {<br />    die(</span><span style="color: #DD0000">'Connection failed: ' </span><span style="color: #007700">. </span><span style="color: #0000BB">stomp_connect_error</span><span style="color: #007700">());<br />}<br /><br /></span><span style="color: #0000BB">var_dump</span><span style="color: #007700">(</span><span style="color: #0000BB">stomp_get_session_id</span><span style="color: #007700">(</span><span style="color: #0000BB">$link</span><span style="color: #007700">));<br /><br /></span><span style="color: #FF8000">/* close connection */<br /></span><span style="color: #0000BB">stomp_close</span><span style="color: #007700">(</span><span style="color: #0000BB">$link</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">?&gt;</span></span></code></div>
    </div>

    <div class="example-contents"><p>Il precedente esempio visualizzerà
qualcosa simile a:</p></div>
    <div class="example-contents screen">
<div class="examplescode"><pre class="examplescode">string(35) &quot;ID:php.net-52873-1257291895530-4:14&quot;</pre>
</div>
   </div>
  </div>
 </div>



</div><?php manual_footer($setup); ?>