예제 #1
0
<?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;