downloads | documentation | faq | getting help | mailing lists | licenses | wiki | reporting bugs | php.net sites | links | conferences | my php.net

search for in the

SAMConnection->__construct> <SAMConnection->commit
Last updated: Fri, 14 Aug 2009

view this page in

SAMConnection->connect

(PECL sam >= 0.1.0)

SAMConnection->connectÉtablie une connexion à un serveur de messagerie

Description

SAMConnection
bool connect ( string $protocol [, array $properties ] )

L'appel à la méthode "connect" sur un objet SAMConnection connecte le script PHP à un serveur de messagerie. Aucun message ne peut être envoyé ou reçu tant qu'une connexion n'est pas établie.

Liste de paramètres

Valeurs de retour

Cette méthode retourne FALSE si une erreur survient.

Exemples

Exemple #1 Création d'une connexion à un serveur de messagerie en utilisant le protocole IBM MQSeries (WMQ)

<?php

$conn
->connect(SAM_WMQ, array(SAM_HOST => 'Myhost.myco.com'SAM_PORT => 1506SAM_BROKER => 'MyBroker'));

?>

Exemple #2 Création d'une connexion avec contrôle des transactions, hôte par défaut et valeur du port de communication

<?php

$conn
->connect(SAM_WMQ, array(SAM_BROKER => 'MyBroker'SAM_TRANSACTIONS => SAM_MANUAL));

?>

Exemple #3 Création d'une connexion à un serveur de messagerie en utilisant le protocole IBM WebSphere Platform Messaging (WPM)

<?php

$conn
->connect(SAM_WPM, array(SAM_ENDPOINTS => 'localhost:7278:BootstrapBasicMessaging',
SAM_BUS => 'Bus1'SAM_TARGETCHAIN => 'InboundBasicMessaging'));

?>



add a note add a note User Contributed Notes
SAMConnection->connect
There are no user contributed notes for this page.

SAMConnection->__construct> <SAMConnection->commit
Last updated: Fri, 14 Aug 2009
 
 
show source | credits | sitemap | contact | advertising | mirror sites