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']; }
/** * @details Construct an IMuSession object and invoke its @link * IMuSession#connect() connect()@endlink method using the `host` and * `port` parameters of the #$config variable. * * @see $session */ protected function connect() { $this->session = new IMuSession(); $this->session->host = $this->config['host']; $this->session->port = $this->config['port']; $this->session->connect(); }
function IMuConnect() { $session = new IMuSession(IMuServer(), IMuPort()); $session->connect(); return $session; }