|
1
|
|
|
<?php |
|
2
|
|
|
|
|
3
|
|
|
namespace lordelph\SIP2\Response; |
|
4
|
|
|
|
|
5
|
|
|
/** |
|
6
|
|
|
* Class ItemInformationResponse provides the response from a ItemInformationRequest |
|
7
|
|
|
* |
|
8
|
|
|
* @method getCirculationStatus() |
|
9
|
|
|
* @method getSecurityMarker() |
|
10
|
|
|
* @method getFeeType() |
|
11
|
|
|
* @method getTransactionDate() |
|
12
|
|
|
* @method getHoldQueueLength() |
|
13
|
|
|
* @method getDueDate() |
|
14
|
|
|
* @method getRecallDate() |
|
15
|
|
|
* @method getHoldPickupDate() |
|
16
|
|
|
* @method getItemIdentifier() |
|
17
|
|
|
* @method getTitleIdentifier() |
|
18
|
|
|
* @method getOwner() |
|
19
|
|
|
* @method getCurrencyType() |
|
20
|
|
|
* @method getFeeAmount() |
|
21
|
|
|
* @method getMediaType() |
|
22
|
|
|
* @method getPermanentLocation() |
|
23
|
|
|
* @method getCurrentLocation() |
|
24
|
|
|
* @method getItemProperties() |
|
25
|
|
|
* @method getScreenMessage() |
|
26
|
|
|
* @method getPrintLine() |
|
27
|
|
|
* @method getSequenceNumber() |
|
28
|
|
|
* |
|
29
|
|
|
* @licence https://opensource.org/licenses/MIT |
|
30
|
|
|
* @copyright John Wohlers <[email protected]> |
|
31
|
|
|
* @copyright Paul Dixon <[email protected]> |
|
32
|
|
|
*/ |
|
33
|
|
|
class ItemInformationResponse extends SIP2Response |
|
34
|
|
|
{ |
|
35
|
|
|
//fixed part of response contains these |
|
36
|
|
|
protected $var = [ |
|
37
|
|
|
'CirculationStatus' => [], |
|
38
|
|
|
'SecurityMarker' => [], |
|
39
|
|
|
'FeeType' => [], |
|
40
|
|
|
'TransactionDate' => [] |
|
41
|
|
|
]; |
|
42
|
|
|
|
|
43
|
|
|
//variable part of the response allowed to contain these... |
|
44
|
|
|
protected $allowedVariables=[ |
|
45
|
|
|
self::CF_HOLD_QUEUE_LENGTH, |
|
46
|
|
|
self::AH_DUE_DATE, |
|
47
|
|
|
self::CJ_RECALL_DATE, |
|
48
|
|
|
self::CM_HOLD_PICKUP_DATE, |
|
49
|
|
|
self::AB_ITEM_IDENTIFIER, |
|
50
|
|
|
self::AJ_TITLE_IDENTIFIER, |
|
51
|
|
|
self::BG_OWNER, |
|
52
|
|
|
self::BH_CURRENCY_TYPE, |
|
53
|
|
|
self::BV_FEE_AMOUNT, |
|
54
|
|
|
self::CK_MEDIA_TYPE, |
|
55
|
|
|
self::AQ_PERMANENT_LOCATION, |
|
56
|
|
|
self::AP_CURRENT_LOCATION, |
|
57
|
|
|
self::CH_ITEM_PROPERTIES, |
|
58
|
|
|
self::AF_SCREEN_MESSAGE, |
|
59
|
|
|
self::AG_PRINT_LINE, |
|
60
|
|
|
self::AY_SEQUENCE_NUMBER |
|
61
|
|
|
]; |
|
62
|
|
|
|
|
63
|
1 |
|
public function __construct($raw) |
|
64
|
|
|
{ |
|
65
|
1 |
|
$this->setVariable('CirculationStatus', substr($raw, 2, 2)); |
|
66
|
1 |
|
$this->setVariable('SecurityMarker', substr($raw, 4, 2)); |
|
67
|
1 |
|
$this->setVariable('FeeType', substr($raw, 6, 2)); |
|
68
|
1 |
|
$this->setVariable('TransactionDate', substr($raw, 8, 18)); |
|
69
|
|
|
|
|
70
|
1 |
|
$this->parseVariableData($raw, 26); |
|
71
|
1 |
|
} |
|
72
|
|
|
} |
|
73
|
|
|
|