Browse Source

Merge 3cb70d9223 into 773de14639

pull/133/merge
GitHub Merge Button 14 years ago
parent
commit
5c3a0eda90
  1. 26
      api/tuque.inc

26
api/tuque.inc

@ -77,8 +77,8 @@ class IslandoraTuque {
$this->cache = new SimpleCache();
$this->repository = new FedoraRepository($this->api, $this->cache);
}
}
}
static function exists() {
return class_exists('RepositoryConnection');
}
@ -91,3 +91,25 @@ class IslandoraTuque {
}
}
function islandora_object_load($object_id) {
static $islandora_tuque = NULL;
if(!$islandora_tuque) {
$islandora_tuque = new IslandoraTuque();
}
if(IslandoraTuque::exists()) {
try {
$fedora_object = $islandora_tuque->repository->getObject($object_id);
} catch (Exception $e) {
return NULL;
}
return $fedora_object;
}
else {
IslandoraTuque::getError();
return NULL;
}
}

Loading…
Cancel
Save