Open Journal Systems  3.3.0
swordapperrordocument.php
1 <?php
2 
3 require_once("swordappentry.php");
4 require_once("utils.php");
5 
7 
8  // The error URI
9  public $sac_erroruri;
10 
11  // Summary description of error
13 
14  // Verbose description of error
16 
17  // Construct a new deposit response by passing in the http status code
18  function __construct($sac_newstatus, $sac_thexml) {
19  // Call the super constructor
20  parent::__construct($sac_newstatus, $sac_thexml);
21  }
22 
23  // Build the error document hierarchy
24  function buildhierarchy($sac_dr, $sac_ns) {
25  // Call the super version
26  parent::buildhierarchy($sac_dr, $sac_ns);
27 
28  foreach($sac_dr->attributes() as $key => $value) {
29  if ($key == 'href') {
30  $this->sac_erroruri = (string)$value;
31  }
32  }
33  // Set error summary & verbose description, if available
34  if(isset($sac_dr->children($sac_ns['atom'])->summary)) {
35  $this->sac_error_summary = (string)$sac_dr->children($sac_ns['atom'])->summary;
36  }
37  if(isset($sac_dr->children($sac_ns['sword'])->verboseDescription)) {
38  $this->sac_verbose_description = (string)$sac_dr->children($sac_ns['sword'])->verboseDescription;
39  }
40  }
41 }
42 
43 ?>
SWORDAPPErrorDocument\$sac_error_summary
$sac_error_summary
Definition: swordapperrordocument.php:12
SWORDAPPErrorDocument\$sac_erroruri
$sac_erroruri
Definition: swordapperrordocument.php:9
SWORDAPPErrorDocument
Definition: swordapperrordocument.php:6
SWORDAPPEntry
Definition: swordappentry.php:6
SWORDAPPErrorDocument\__construct
__construct($sac_newstatus, $sac_thexml)
Definition: swordapperrordocument.php:18
SWORDAPPErrorDocument\$sac_verbose_description
$sac_verbose_description
Definition: swordapperrordocument.php:15
SWORDAPPErrorDocument\buildhierarchy
buildhierarchy($sac_dr, $sac_ns)
Definition: swordapperrordocument.php:24