Last active
May 1, 2018 19:33
-
-
Save jonathangreen/447b47ddaf2aa23ade75556ad9311be8 to your computer and use it in GitHub Desktop.
Tuque datastream versions
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
// Some docs here: | |
// https://github.com/Islandora/islandora/wiki/Working-With-Fedora-Objects-Programmatically-Via-Tuque | |
// https://github.com/Islandora/islandora/wiki/Build,-Access,-Modify-and-Delete-Fedora-objects-with-the-Tuque-interface | |
$object = islandora_object_load('my:pid'); | |
$dsid = $object['DSID']; | |
$number_of_versions = count($dsid); | |
foreach ($dsid as $version) { | |
print $version->createdDate->format('Y-m-d H:i:s'); | |
} | |
$my_ds_content = $dsid[2]->content; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment