本文整理匯總了PHP中Connect::listen方法的典型用法代碼示例。如果您正苦於以下問題:PHP Connect::listen方法的具體用法?PHP Connect::listen怎麽用?PHP Connect::listen使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Connect
的用法示例。
在下文中一共展示了Connect::listen方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Connect
<?php
/**
* Class to listen for the JMS messages and filter them
* based on the rules defined in config.xml
*
* @author Richard Wincewicz
*/
$connect = new Connect();
$connect->listen();
unset($connect);
class Connect
{
function __construct()
{
include_once 'message.php';
include_once 'fedoraConnection.php';
include_once 'connect.php';
include_once 'Derivatives.php';
include_once 'Logging.php';
// Load config file
$config_file = file_get_contents('config.xml');
$this->config_xml = new SimpleXMLElement($config_file);
// Logging settings
$log_file = $this->config_xml->log->file;
$this->log = new Logging();
$this->log->lfile($log_file);
$this->fedora_url = 'http://' . $this->config_xml->fedora->host . ':' . $this->config_xml->fedora->port . '/fedora';
$this->user = new stdClass();
$this->user->name = $this->config_xml->fedora->username;
$this->user->pass = $this->config_xml->fedora->password;