本文整理汇总了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;