Exemplo n.º 1
0
 public function __construct($config, $type)
 {
     $this->update_since = $this->setUpdateTimestamp($config['update_since']);
     $this->export_path = $config['export_path'];
     $session = new \IMuSession($config['host'], $config['port']);
     $session->connect();
     $this->catalogue = new \IMuModule('ecatalogue', $session);
     $terms = new \IMuTerms();
     if ($type == 'update') {
         $terms->add('AdmDateModified', $this->update_since, '>');
     }
     $this->count = $this->catalogue->findTerms($terms);
     $this->fields = $config['fields'];
     $this->catalogue->addFetchSet('exportFields', $this->fields);
     $this->start = $config['start'];
     $this->chunk = $config['chunk'];
     $this->transform = $config['transform_data'];
 }
Exemplo n.º 2
0
 public static function setDefaultPort($port)
 {
     self::$_defaultPort = $port;
 }
Exemplo n.º 3
0
 /**
  * @details Disconnect from the IMuSession.
  *
  * @see $session
  */
 protected function disconnect()
 {
     $this->session->disconnect();
 }
Exemplo n.º 4
0
 public static function setDefaultTimeout($timeout)
 {
     self::$_defaultTimeout = $timeout;
 }
Exemplo n.º 5
0
function IMuConnect()
{
    $session = new IMuSession(IMuServer(), IMuPort());
    $session->connect();
    return $session;
}