1 | <?php |
||
13 | class Items extends LazyResourceList implements \Countable, \Iterator, \ArrayAccess |
||
14 | { |
||
15 | use ReadOnlyArrayAccess; |
||
16 | use IterableCollection; |
||
17 | |||
18 | /** |
||
19 | * The Bib this Items list belongs to. |
||
20 | * |
||
21 | * @var Bib |
||
22 | */ |
||
23 | public $bib; |
||
24 | |||
25 | /** |
||
26 | * The Holding this Items list belongs to. |
||
27 | * |
||
28 | * @var Holding |
||
29 | */ |
||
30 | public $holding; |
||
31 | |||
32 | /** |
||
33 | * Items constructor. |
||
34 | * |
||
35 | * @param Client $client |
||
36 | * @param Bib $bib |
||
37 | * @param Holding $holding |
||
38 | */ |
||
39 | public function __construct(Client $client, Bib $bib = null, Holding $holding = null) |
||
45 | |||
46 | /** |
||
47 | * Convert a data element to a resource object. |
||
48 | * |
||
49 | * @param $data |
||
50 | * @return Item |
||
51 | */ |
||
52 | protected function convertToResource($data) |
||
57 | |||
58 | /** |
||
59 | * Generate the base URL for this resource. |
||
60 | * |
||
61 | * @return string |
||
62 | */ |
||
63 | protected function urlBase() |
||
67 | |||
68 | /** |
||
69 | * Get an Item object from a barcode. |
||
70 | * |
||
71 | * @param string $barcode |
||
72 | * |
||
73 | * @return Item|null |
||
74 | */ |
||
75 | public function fromBarcode($barcode) |
||
94 | } |
||
95 |