- add ResumptionToken for OAI-ListIdentifiers
- max identifiers and reciords via config - add constants.php - add clear-expired command for deleting obsolete cache
This commit is contained in:
parent
9d8625225f
commit
79b51e93e7
11 changed files with 395 additions and 27 deletions
68
app/Models/Oai/Configuration.php
Normal file
68
app/Models/Oai/Configuration.php
Normal file
|
@ -0,0 +1,68 @@
|
|||
<?php
|
||||
|
||||
namespace App\Models\Oai;
|
||||
|
||||
class Configuration
|
||||
{
|
||||
/**
|
||||
* Hold path where to store temporary resumption token files.
|
||||
*
|
||||
* @var string
|
||||
*/
|
||||
private $pathTokens = '';
|
||||
|
||||
/**
|
||||
* Holds maximum number of identifiers to list per request.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
private $maxListIds = 15;
|
||||
|
||||
/**
|
||||
* Holds maximum number of records to list per request.
|
||||
*
|
||||
* @var int
|
||||
*/
|
||||
private $maxListRecs = 15;
|
||||
|
||||
public function __construct()
|
||||
{
|
||||
$this->maxListIds = config('oai.max.listidentifiers');
|
||||
|
||||
$this->maxListRecs = config('oai.max.listrecords');
|
||||
|
||||
$this->pathTokens = config('app.workspacePath')
|
||||
. DIRECTORY_SEPARATOR .'tmp'
|
||||
. DIRECTORY_SEPARATOR . 'resumption';
|
||||
}
|
||||
|
||||
/**
|
||||
* Return temporary path for resumption tokens.
|
||||
*
|
||||
* @return string Path.
|
||||
*/
|
||||
public function getResumptionTokenPath()
|
||||
{
|
||||
return $this->pathTokens;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return maximum number of listable identifiers per request.
|
||||
*
|
||||
* @return int Maximum number of listable identifiers per request.
|
||||
*/
|
||||
public function getMaxListIdentifiers()
|
||||
{
|
||||
return $this->maxListIds;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return maximum number of listable records per request.
|
||||
*
|
||||
* @return int Maximum number of listable records per request.
|
||||
*/
|
||||
public function getMaxListRecords()
|
||||
{
|
||||
return $this->maxListRecs;
|
||||
}
|
||||
}
|
Loading…
Add table
editor.link_modal.header
Reference in a new issue