Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

6.x #133

Merged
merged 2 commits into from

2 participants

Jordan Dukart Jonathan Green
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 24 additions and 2 deletions.
  1. +24 −2 api/tuque.inc
26 api/tuque.inc
View
@@ -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;
+ }
+ }
+
+
Something went wrong with that request. Please try again.