Пример #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'];
 }
Пример #2
0
 /**
  * @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();
 }
Пример #3
0
function IMuConnect()
{
    $session = new IMuSession(IMuServer(), IMuPort());
    $session->connect();
    return $session;
}