Open Journal Systems  3.3.0
OAIUtils Class Reference

Static Public Member Functions

static parseStr ($string, &$array)
 
static prepInput (&$data)
 
static prepOutput (&$data)
 
static UTCDate ($timestamp=0, $includeTime=true)
 
static UTCtoTimestamp ($date, $requiredGranularity=null)
 

Detailed Description

Definition at line 18 of file OAIUtils.inc.php.

Member Function Documentation

◆ parseStr()

static OAIUtils::parseStr (   $string,
$array 
)
static

Parses string $string into an associate array $array. Acts like parse_str($string, $array) except duplicate variable names in $string are converted to an array.

Parameters
$duplicatestring input data string
$arrayarray of parsed parameters

Definition at line 123 of file OAIUtils.inc.php.

Referenced by OAI\__construct().

◆ prepInput()

static OAIUtils::prepInput ( $data)
static

Clean input variables (by reference).

Parameters
$datamixed request parameter(s)

Definition at line 77 of file OAIUtils.inc.php.

Referenced by OAI\__construct().

◆ prepOutput()

static OAIUtils::prepOutput ( $data)
static

Prepare variables for output (by reference). Data is assumed to be UTF-8 encoded (FIXME?)

Parameters
$datamixed output parameter(s)
Returns
mixed cleaned output parameter(s)

Definition at line 99 of file OAIUtils.inc.php.

Referenced by PKPOAIMetadataFormat_DC\formatElement(), OAIMetadataFormat_RFC1807\formatElement(), OAI\Identify(), OAI\ListIdentifiers(), OAI\ListRecords(), OAI\ListSets(), and OAI\response().

◆ UTCDate()

static OAIUtils::UTCDate (   $timestamp = 0,
  $includeTime = true 
)
static

Return a UTC-formatted datestamp from the specified UNIX timestamp.

Parameters
$timestampint *nix timestamp (if not used, the current time is used)
$includeTimeboolean include both the time and date
Returns
string UTC datestamp

Definition at line 26 of file OAIUtils.inc.php.

Referenced by PKPOAIDAO\_doCommonOAIFromRowOperations(), OAI\Identify(), OAI\ListIdentifiers(), OAI\ListRecords(), OAI\ListSets(), and OAI\response().

◆ UTCtoTimestamp()

static OAIUtils::UTCtoTimestamp (   $date,
  $requiredGranularity = null 
)
static

Returns a UNIX timestamp from a UTC-formatted datestamp. Returns the string "invalid" if datestamp is invalid, or "invalid_granularity" if unsupported granularity.

Parameters
$datestring UTC datestamp
$requiredGranularitystring Datestamp granularity to require (default: not checked)
Returns
int timestamp

Definition at line 48 of file OAIUtils.inc.php.

Referenced by OAI\extractDateParams(), and PKPOAIDAO\getEarliestDatestamp().


The documentation for this class was generated from the following file: