Skip to content

Commit

Permalink
discoverygarden#69: documentation cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ctgraham committed Sep 22, 2022
1 parent 49836c9 commit cf14143
Showing 1 changed file with 14 additions and 8 deletions.
22 changes: 14 additions & 8 deletions includes/ead_html.inc
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,8 @@ function islandora_manuscript_build_flat_subfile_query(array $containers) {
}

/**
* Return the path to the cache of EAD HTML files
* Return the path to the cache directory of EAD HTML files
*
* @return string The path to the files
*/
function islandora_manuscript_cache_eadhtml_path() {
Expand All @@ -309,14 +310,16 @@ function islandora_manuscript_cache_eadhtml_path() {

/**
* Return the suffix to the cached EAD HTML files
*
* @return string The suffix to the files
*/
function islandora_manuscript_cache_eadhtml_suffix() {
return '.cache';
}

/**
* Return the filepath to the cached EAD HTML file
* Return the file path for a cached EAD HTML file
*
* @param string $objectid The object's PID
* @return string The path of the cache file
*/
Expand All @@ -326,15 +329,17 @@ function islandora_manuscript_cache_eadhtml_file($objectid) {
}

/**
* Return the suffix to the expired cached EAD HTML files
* Return the suffix to the expired EAD HTML cache files
*
* @return string The suffix to the files
*/
function islandora_manuscript_cache_eadhtml_expired_suffix() {
return '.expired';
}

/**
* Return the suffix to the cached EAD HTML files
* Return the file path for an expired EAD HTML file cache
*
* @param string $objectid The object's PID
* @return string The path of the expired cache file
*/
Expand All @@ -343,9 +348,10 @@ function islandora_manuscript_cache_eadhtml_expired_file($objectid) {
}

/**
* Return whether the current cachefile is valid
* Return whether the current cachefile for an object exists and is valid
*
* @param string $objectid The object's PID
* @return string The suffix to the files
* @return boolean Whether a valid cachefile exists
*/
function islandora_manuscript_cache_check($objectid) {
$cachekey = islandora_manuscript_cache_eadhtml_file($objectid);
Expand All @@ -360,9 +366,10 @@ function islandora_manuscript_cache_check($objectid) {

/**
* Return whether the named cachefile is valid
*
* @param string $filename The path and filename of the cachefile
* @param int $minimumdate An optional unixdate which the cachefile must not be older than
* @return boolean Whether the cachefile is existant and unexpired
* @return boolean Whether the cachefile is existant and unexpired and more recent than the minimum date
*/
function islandora_manuscript_cachefile_check($filename, $minimumdate = null) {
if (file_exists($filename)) {
Expand All @@ -380,7 +387,6 @@ function islandora_manuscript_cachefile_check($filename, $minimumdate = null) {
return false;
}


/**
* Get a rendered EAD to HTML transform, indexed by object id
*
Expand Down

0 comments on commit cf14143

Please sign in to comment.