php-doc-en/reference/sam/functions/SAM-Connection-isConnected.xml
2009-03-18 21:30:26 +00:00

89 lines
2.1 KiB
XML

<?xml version="1.0" encoding="iso-8859-1"?>
<!-- $Revision: 1.7 $ -->
<refentry xml:id='function.samconnection-isconnected' xmlns="http://docbook.org/ns/docbook">
<refnamediv>
<refname>SAMConnection->isConnected</refname>
<refpurpose>
Queries whether a connection is established to a Messaging Server
</refpurpose>
</refnamediv>
<refsect1 role="description">
&reftitle.description;
<classsynopsis>
<ooclass><classname>SAMConnection</classname></ooclass>
<methodsynopsis>
<type>bool</type><methodname>isConnected</methodname>
<void/>
</methodsynopsis>
</classsynopsis>
<para>
Calling the "isConnected" method on a Connection object will check whether
the PHP script is connected to a messaging server. No messages can be sent
or received unless a connection has been established with a Messaging
server.
</para>
</refsect1>
<refsect1 role="returnvalues">
&reftitle.returnvalues;
<para>
This method returns &true; if the SAMConnection object is successfully
connected to a Messaging server or &false; otherwise.
</para>
</refsect1>
<refsect1 role="examples">
&reftitle.examples;
<para>
<example>
<title>Checking whether there us a connection to a Messaging Server</title>
<programlisting role="php">
<![CDATA[
<?php
if ($conn->isConnected()) {
echo 'Connection is active.';
} else {
echo 'No active connection!';
}
?>
]]>
</programlisting>
</example>
</para>
</refsect1>
<refsect1 role="seealso">
&reftitle.seealso;
<para>
<simplelist>
<member><xref linkend="function.samconnection-disconnect" /></member>
<member><xref linkend="function.samconnection-connect" /></member>
</simplelist>
</para>
</refsect1>
</refentry>
<!-- Keep this comment at the end of the file
Local variables:
mode: sgml
sgml-omittag:t
sgml-shorttag:t
sgml-minimize-attributes:nil
sgml-always-quote-attributes:t
sgml-indent-step:1
sgml-indent-data:t
indent-tabs-mode:nil
sgml-parent-document:nil
sgml-default-dtd-file:"../../../../manual.ced"
sgml-exposed-tags:nil
sgml-local-catalogs:nil
sgml-local-ecat-files:nil
End:
vim600: syn=xml fen fdm=syntax fdl=2 si
vim: et tw=78 syn=sgml
vi: ts=1 sw=1
-->